Coder Social home page Coder Social logo

whether-sweater's Introduction

README

Learning goals:

  • Expose an API that aggregates data from multiple external APIs
  • Expose an API that requires an authentication token
  • Expose an API for CRUD functionality
  • Determine completion criteria based on the needs of other developers
  • Test both API consumption and exposure, making use of at least one mocking tool (VCR, Webmock, etc).

How to clone this repo to your local machine:

Where to get your own API keys:

Happy Path Endpoint Usage: *** Make sure you have signed up for api keys for both the mapquest API and the WeatherAPI! ***

  • There are four endpoints in this application that you can reach out to:

    1. Landing Page: Endpoint: get "/forecast"
    • A successful request looks like:

      GET /api/v0/forecast?location=cincinatti,oh Content-Type: application/json Accept: application/json

      You will need a location parameter, an aqi parameter, and a days parameter.

      • The location parameter refers to the location at which you wish to see the forecast for.
      • The aqi refers to an air quality index, and accepts a 'yes' or 'no' value.
      • The days parameter refers to how many days you wish to see a weather forecast for. The value is accepted as an integer.
    1. User Account Creation Endpoint: post "/users"
    • A successful request looks like:

      POST /api/v0/users Content-Type: application/json Accept: application/json

      JSON Payload to send with the request: { "email": "[email protected]", "password": "password", "password_confirmation": "password" }

      You will need a email parameter, an password parameter, and a password_confirmation parameter.

      • The email parameter refers to the email you are signing up with.
      • The password is the password you wish to set for your account.
      • The password_confirmation should match the password parameter exactly. Otherwise, your account will not be created.
    1. Existing User Log In: Endpoint: post "/sessions"

      • A successful request looks like:

      POST /api/v0/sessions Content-Type: application/json Accept: application/json

      JSON Payload to send with the request: { "email": "[email protected]", "password": "password" }

      You will need a email parameter and a password parameter.

      • The email parameter refers to the email you are signed up with.
      • The password is the password associated with the account.
    2. Road Trip: Endpoint: post "/road_trip"

      • A successful request looks like:

      POST /api/v0/road_trip Content-Type: application/json Accept: application/json

      JSON Payload to send with the request: { "origin": "Cincinatti,OH", "destination": "Chicago,IL", "api_key": "t1h2i3s4_i5s6_l7e8g9i10t11" }

      You will need an origin parameter, a destination parameter, and an api_key parameter.

      • The origin parameter refers to your starting location.
      • The destination is the location you wish to end your road trip at.
      • The api_key is the WeatherAPI key that you should have signed up for.

If you have any further questions, feel free to reach out to me at [email protected]. I would be happy to answer any further questions for you.

whether-sweater's People

Contributors

josephlee702 avatar

Stargazers

 avatar

Watchers

 avatar

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.