MadelineMauser / 2208-final-assessment-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Final Assessment

Set Up

You will need to sign up for an api key for the Geocoding Service.

To get your repo set up, please do the following:

  1. Fork and clone this repository onto your local machine
  2. cd final_assessment_starter_2208
  3. bundle install
  4. rails db:{create,migrate}
  5. bundle exec figaro install
  6. In your application.yml, assign your geocoding api key with the variable api-ninja-key

Make sure it's working locally:

  1. Run bundle exec rspec. You should have 5 passing tests.
  2. Run rails s, and use postman to try out the endpoint GET /api/v1/capital_info for a country that you must provide in the parameters. For example, /api/v1/capital_info?country=france or /api/v1/capital_info?country=nigeria. You should see a json response that looks something like this:
        {
        "data": {
            "id": null,
            "type": "capital",
            "attributes": {
                "city": "Abuja",
                "country": "Nigeria",
                "country_code": "NG",
                "latitude": 9.0643305,
                "longitude": 7.4892974
            }
        }
    }

Get Prepped for the New API

In tomorrow's assessment, you'll be using the Places API. You'll need an API key for this service. Please read the following instructions carefully:

  1. Visit the Places API to see the capabilities of the API to consume.
  2. Follow these directions to set up an account and get your API key set up.
  3. We suggest that you set up Postman to call several different endpoints. Experiment with different parameters so you can see what they do, how you could use things to filter data, etc.

About


Languages

Language:Ruby 99.3%Language:HTML 0.7%