Git Product home page Git Product logo

powderkeg's Introduction

Powder Keg

Module 4 | Contributors: Autumn Martin

About

Intro

Powder Keg finds the ski resort with the most ideal conditions for a great powder day! This API provides weather data (snowfall, wind, sunshine, etc.) specific to Colorado ski resorts to help skiers and snowboarders plan their trip to the mountain. It also provides awesome pics of skiers & snowboarders to get users in the zone.

PowderKeg is deployed here.

Background

PowderKeg is an API which consumes weather data from DarkSky and World Weather Online. PowderKeg is deployed here, and you are looking at its source repository here. PowderKeg is consumed by my other app, Ski Meow. Ski Meow is a JavaScript single page app that displays weather data for local Ski Resorts. PowderKeg also consumes data from Unsplash, which Ski Meow uses to feature a random image for the background.

Tech Stack

Rails 5.2.1, Ruby 2.5.1, RSpec, PostgreSQL, Faraday

Endpoints

Random image related to search words

GET /api/v1/images?query=#{search_params}

Request:

GET /api/v1/images?query=ski,snowboard
Content-Type: application/json
Accept: application/json

Response:

Weather data based on resort name

GET /api/v1/snowcast?location=#{resort.name}

Request:

GET /api/v1/snowcast?location=crested_butte
Content-Type: application/json
Accept: application/json

Response:

Register

POST /api/v1/users

Request:

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

{
  "email": "[email protected]",
  "password": "password"
  "password_confirmation": "password"
}

Response:

status: 201
body:

{
  "api_key": "asd8987dfajskdl238j23h",
}

Log In

POST /api/v1/sessions

Request:

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

{
  "email": "[email protected]",
  "password": "password"
}

Response:

status: 200
body:

{
  "api_key": "uio1423dfaj234l238j45z",
}

Getting started

Production

This app has been deployed to Heroku. It may be viewed in production here: https://powderkeg.herokuapp.com/

Development

First, clone this repository via git clone [email protected]:Autumn-Martin/powderkeg.git.

Run rails g figaro to create a application.yml file to hold your API keys that will be gitignored. You will need API keys from DarkSky, World Weather Service, & Unplash.

You will also need the Rails application's secret key (Rails.application.credentials.secret_key_base). More info about this here

Install the required gems for this application using Bundler. Run bundle in the CLI.

Run rake db:setup to create the database, build tables and columns based the schema, & seed the data.

Start a server with rails s.

Now view the app locally in development by visiting http://localhost:3000/ in your browser.

Testing

The test suite is created through RSpec. To run this test suite, run rspec. Currently, this repo maintains 100% test coverage.

powderkeg's People

Contributors

zingsurfer avatar

Watchers

James Cloos avatar

powderkeg'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.