GithubHelp home page GithubHelp logo

vanmars / bestsellers Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 164 KB

Practice exercise for Epicodus to make API calls in a Rails project, use SimpleCov gem, test API calls with vcr gem, and add authentication and authorization.

Ruby 22.42% JavaScript 0.66% CSS 0.39% HTML 76.53%
books api

bestsellers's Introduction

Best Sellers

19 October 2020

Rails app that gets list of bestseller books from the NYT API

By Joeseph Karnafel and Vanessa Stewart

Description

This is an exercise for Epicodus to practice making an API based application with bcrypt authentication. We set up a basic site that allows users to log in. We also used the HTTParty gem to make a call to the NYT API and vcr and webmock to practice stubbing those calls. We added a services spec folder to practice making tests for an API call as well. The original instructions include:

Build an application around an API of your choice that uses authentication. For possible sources of inspiration, see this list of public APIs. You should build out the project in the following order to prioritize authentication and authorization, which will be required for this week's independent project.

First, add authentication with bcrypt. Your site should have options to sign up, sign in and sign out users. Don't move on to the next step until authentication is fully implemented.

Next, add a protected route that only signed-in users can access. The view for this route should just be boilerplate for now. For instance, if a signed-in user tries to access the route, they will see a message that says: "Protected content reached." If a user that's not signed in tries to access the same route, they'll see a message that says: "You need to be signed in to access that content."

Once authentication and authorization are set up and working, add an API call to the mix. When a user signs in and goes to the protected page, they will be able to get content from the API. It's up to you to decide what content you want to present and how it should be presented.

User Stories

  • A user should be able to sign up, sign in, and sign out.
  • Only signed in users should be able to see a list of NYT bestsellers on the user index page.

Technologies Used

  • Ruby
  • Rails
  • Postgres
  • Ruby Gems: HTTParty, bcrypt, dotenv-rails, vcr, webmock, simplecov, capybara, shoulda-matchers, pry, launchy, rspec, jquery

License

Copyright (c) 2020 Joeseph Karnafel and Vanessa Stewart

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bestsellers's People

Contributors

vanmars avatar

Watchers

 avatar

Forkers

joebenitus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.