Giter Club home page Giter Club logo

weather_api_app's Introduction

About project

This is a weather statistics service using https://developer.accuweather.com/apis as a data source.

Usage:

  • Clone repo: git clone [email protected]:Shkuryn/weather_api_app.git
  • Go to the app folder: cd ./weather_api_app
  • Create .env file echo "ACCUWEATHER_API_KEY=VALUE" > .env echo "LOCATION_KEY=VALUE" > .env (find your city location code or by default will be used LOCATION_KEY=28580)
  • Run docker for ex. docker build -t weather_api_app:1.0 docker run {your_image}
  • Create DB Enter to the running container docker exec -it container_name /bin/bash and run bundle exec rails db:create db:migrate
  • Run bundle exec rails c and call Accuweather Service by AccuweatherService.call

List of endpoints:

  • /weather/current - Current temperature
  • /weather/historical - Hourly temperature for the last 24 hours (API Documentation)
  • /weather/historical/max - Maximum temperature for 24 hours
  • /weather/historical/min - Minimum temperature for 24 hours
  • /weather/historical/avg - Average temperature over 24 hours
  • /weather/by_time - Find the temperature closest to the transmitted timestamp (e.g., 1621823790 should return the temperature for 2021-05-24 08:00. If the time is not available, return 404)
  • /health - Backend status (Always responds with OK)

weather_api_app's People

Contributors

shkuryn 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.