You will need to sign up for an api key for the Geocoding Service.
To get your repo set up, please do the following:
- Fork and clone this repository onto your local machine
cd final_assessment_starter_2208
bundle install
rails db:{create,migrate}
bundle exec figaro install
- In your
application.yml
, assign your geocoding api key with the variableapi-ninja-key
- Run
bundle exec rspec
. You should have 5 passing tests. - Run
rails s
, and use postman to try out the endpointGET /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 } } }
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:
- Visit the Places API to see the capabilities of the API to consume.
- Follow these directions to set up an account and get your API key set up.
- 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.