Coder Social home page Coder Social logo

sweater_weather's Introduction

LinkedIn Inline docs


Logo

Sweater Weather

Welcome to the Sweater Weather API


Table of Contents

About The Project

Sweater weather is a exercise in:

  • Consuming Weather data through the Dark Sky API,
  • Location data through Google Geocoding,
  • Yelp information from the Yelp Fusion API.

Built With

Getting Started

This API is hosted on Heroku Hosted

Project specs can be found here Specs

Usage/Endpoints

Run in Postman

This project exposes four endpoints. These endpoints will inform a fictitious front end

1. Create User

  • Endpoint

    • POST "<domain>/api/v1/users"
  • Required Params:

    - Returned JSON (click me):
      {
          "api_token": "qhEvzTfq6_p4KQm7_EzSJQ"
      }
  • Notes:
    • If this user is already registered, API will submit a redirect: 302 :found

2. Login User

  • Endpoint

    • POST "<domain>/api/v1/users"
  • Required Params:

    Returned JSON (click me):
      {
          "api_token": "qhEvzTfq6_p4KQm7_EzSJQ"
      }

3. Forecast

  • Endpoint

    • GET "<domain>/api/v1/forcast"
  • Required Params:

    • location:
      • IE- denver, co
    Returned JSON (click me):
      {
          "data": {
              "id": null,
              "type": "forecast",
              "attributes": {
                  "forecast_summary": {
                      "icon": "clear-day",
                      "summary": "Clear",
                      "temperature": 65.92,
                      "temperature_high": 77.76,
                      "temperature_low": 49.02,
                      "state": "denver",
                      "city": " co",
                      "time": 1588183457,
                      "date": 1588183457
                  },
                  "forecast_details": {
                      "summary": "Clear",
                      "feel_like": 65.92,
                      "humidity": 20,
                      "visiblity": "10.00",
                      "uv_index": 9,
                      "today_message": "Clear throughout the day.",
                      "tonight_message": "Clear",
                      "icon": [
                          "clear-day",
                          "Clear",
                          65.92,
                          20,
                          "10.00",
                          9,
                          "Clear throughout the day.",
                          "Clear"
                      ]
                  },
                  "forecast_days_in_review": {
                      "daily_stats": [
                          [
                              {
                                  "time": 1588140000
                              },
                              {
                                  "icon": "clear-day"
                              },
                              {
                                  "humidity": 0.3
                              },
                              {
                                  "temperatureHigh": 77.76
                              },
                              {
                                  "temperatureLow": 49.02
                              }
                          ],
                          [
                              {
                                  "time": 1588226400
                              },
                              {
                                  "icon": "partly-cloudy-day"
                              },
                              {
                                  "humidity": 0.25
                              },
                              {
                                  "temperatureHigh": 88.16
                              },
                              {
                                  "temperatureLow": 57.14
                              }
                          ],
                          [
                              {
                                  "time": 1588312800
                              },
                              {
                                  "icon": "clear-day"
                              },
                              {
                                  "humidity": 0.29
                              },
                              {
                                  "temperatureHigh": 86.44
                              },
                              {
                                  "temperatureLow": 52.09
                              }
                          ],
                          [
                              {
                                  "time": 1588399200
                              },
                              {
                                  "icon": "rain"
                              },
                              {
                                  "humidity": 0.61
                              },
                              {
                                  "temperatureHigh": 69.29
                              },
                              {
                                  "temperatureLow": 49.23
                              }
                          ],
                          [
                              {
                                  "time": 1588485600
                              },
                              {
                                  "icon": "partly-cloudy-day"
                              },
                              {
                                  "humidity": 0.42
                              },
                              {
                                  "temperatureHigh": 85.79
                              },
                              {
                                  "temperatureLow": 51.81
                              }
                          ],
                          [
                              {
                                  "time": 1588572000
                              },
                              {
                                  "icon": "clear-day"
                              },
                              {
                                  "humidity": 0.34
                              },
                              {
                                  "temperatureHigh": 80.56
                              },
                              {
                                  "temperatureLow": 48.99
                              }
                          ],
                          [
                              {
                                  "time": 1588658400
                              },
                              {
                                  "icon": "partly-cloudy-day"
                              },
                              {
                                  "humidity": 0.27
                              },
                              {
                                  "temperatureHigh": 75.02
                              },
                              {
                                  "temperatureLow": 51.9
                              }
                          ],
                          [
                              {
                                  "time": 1588744800
                              },
                              {
                                  "icon": "partly-cloudy-day"
                              },
                              {
                                  "humidity": 0.26
                              },
                              {
                                  "temperatureHigh": 81.49
                              },
                              {
                                  "temperatureLow": 43.67
                              }
                          ]
                      ]
                  },
                  "forecast_hours_in_review": {
                      "hourly_stats": [
                          [
                              {
                                  "time": 1588183200
                              },
                              {
                                  "temperature": 65.7
                              }
                          ],
                          [
                              {
                                  "time": 1588186800
                              },
                              {
                                  "temperature": 68.47
                              }
                          ],
                          [
                              {
                                  "time": 1588190400
                              },
                              {
                                  "temperature": 71.12
                              }
                          ],
                          [
                              {
                                  "time": 1588194000
                              },
                              {
                                  "temperature": 74.14
                              }
                          ],
                          [
                              {
                                  "time": 1588197600
                              },
                              {
                                  "temperature": 76.16
                              }
                          ],
                          [
                              {
                                  "time": 1588201200
                              },
                              {
                                  "temperature": 77.24
                              }
                          ],
                          [
                              {
                                  "time": 1588204800
                              },
                              {
                                  "temperature": 76.64
                              }
                          ],
                          [
                              {
                                  "time": 1588208400
                              },
                              {
                                  "temperature": 74.47
                              }
                          ],
                          [
                              {
                                  "time": 1588212000
                              },
                              {
                                  "temperature": 70.31
                              }
                          ]
                      ]
                  }
              }
          }
      }

4. Generate a RoadTrip!

  • Endpoint
    • GET "<domain>/api/v1/forcast"
  • Required Params:
    • origin:

      • IE- denver, co
    • destination:

      • IE- Fort Lupton, co
      Returned JSON (click me):
      {
          "data": {
              "id": null,
              "type": "road_trip",
              "attributes": {
                  "id": null,
                  "start_location": "kansas city, ks",
                  "end_location": "denver, co",
                  "travel_time": "8 hours 40 mins",
                  "forecast": "Possible light rain in the morning.",
                  "arrival_temperature": 60.31
              }
          }
      }

License

Distributed under the Creative Commons License.

Contact

Joshua O'Bannon - @jtobannon - [email protected]

Project Link: https://github.com/jobannon/sweater_weather

sweater_weather's People

Contributors

jobannon avatar

Watchers

James Cloos avatar  avatar

Forkers

hale4029

sweater_weather's Issues

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.