Git Product home page Git Product logo

api_spike's Introduction

api_spike

Class assignment May 05

Your assignment is to write two scripts, one for each API, that uses the Faraday gem (https://github.com/lostisland/faraday) to make API requests using the following APIs. If you have other APIs, please feel free to use them.

Please push all work to a new repository called ‘api_spike’. Include a Gemfile in your project. Include your Github URL on this document: https://github.com/gSchool/march2014ProjectUrls/blob/master/apiSpike.md

http://openweathermap.org/API

  1. Display the current weather for a city of your choice
  2. Get the 7 day forecast for a city of your choosing.

https://www.pivotaltracker.com/help/api (requires use of HTTP header for authentication https://www.pivotaltracker.com/help/api#Authenticating_Using_API_Tokens)

  1. List all of your projects (https://www.pivotaltracker.com/help/api/rest/v5#Projects)
  2. List the stories in a project (https://www.pivotaltracker.com/help/api/rest/v5#Stories)
  3. Show the details of a specific story (https://www.pivotaltracker.com/help/api/rest/v5#Story)

++++++++++++++

Let's get these guys working!

Weather Cruncher

  • fork, clone, bundle install

  • in terminal:

    $ irb

    require '' weather = WeatherCruncher.new weather.current_weather(Denver)

Displays current weather conditions in Denver.

> weather.forcast_7_day(Denver)

Displays 7 day forecast for Denver.

Pivotal Tracker Cruncher

  • fork, clone, bundle install (unless you already did for the Weather Cruncher)

  • in terminal:

    $ irb

    require '' ptc = PivotalTrackerCruncher.new('') ptc.list_projects ptc.list_unstarted_stories() ptc.list_details_of_story(, )

Oh Hey! Remember that you totally SHOULD NOT push your api token! Maybe save that in a .env file that is added to your .gitignore file.

  • Check out that .env.example file... copy that to a .env file, add your api token for Pivotal Tracker, and create a .gitignore file with the contents being:

    .env

Hooray! Secret token safe, and working code.

api_spike's People

Contributors

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