From 663ad441046c31c4ab6b90a2d649a2f0c3bbb7e5 Mon Sep 17 00:00:00 2001 From: blark Date: Fri, 12 Mar 2021 16:19:43 -0600 Subject: [PATCH] add json files and README --- AerisWeather API.postman_collection.json | 513 ++++++++++++++++++++++ AerisWeather API.postman_environment.json | 29 ++ README.md | 33 ++ 3 files changed, 575 insertions(+) create mode 100644 AerisWeather API.postman_collection.json create mode 100644 AerisWeather API.postman_environment.json create mode 100644 README.md diff --git a/AerisWeather API.postman_collection.json b/AerisWeather API.postman_collection.json new file mode 100644 index 0000000..8367d74 --- /dev/null +++ b/AerisWeather API.postman_collection.json @@ -0,0 +1,513 @@ +{ + "info": { + "_postman_id": "7d985096-6289-4cbe-8eb8-52b7ebbc6169", + "name": "AerisWeather API", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "item": [ + { + "name": "Forecasts", + "item": [ + { + "name": "Air Quality", + "item": [ + { + "name": "5 Day", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/airquality/forecasts/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}", + "host": [ + "{{env}}" + ], + "path": [ + "airquality", + "forecasts", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + } + ] + }, + "description": "Return the next 5 days of air quality data for a defined location.\n\nFor more information, visit our [air quality forecasts endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/airquality-forecasts/) documentation." + }, + "response": [] + }, + { + "name": "Next 24 Hours", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/airquality/forecasts/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&filter=1hr&limit=24&from=now&to=1days", + "host": [ + "{{env}}" + ], + "path": [ + "airquality", + "forecasts", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + }, + { + "key": "filter", + "value": "1hr" + }, + { + "key": "limit", + "value": "24" + }, + { + "key": "from", + "value": "now" + }, + { + "key": "to", + "value": "1days" + } + ] + }, + "description": "Provides hourly air quality data for the next 24 hours at the specified location.\n\nFor more information, visit our [air quality forecasts endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/airquality-forecasts/) documentation." + }, + "response": [] + } + ] + }, + { + "name": "14 Day", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/forecasts/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&limit=14", + "host": [ + "{{env}}" + ], + "path": [ + "forecasts", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + }, + { + "key": "limit", + "value": "14" + } + ] + }, + "description": "Returns 14 day periods of forecast data for the specified location.\n\nFor more information, visit our [forecasts endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/forecasts/) documentation." + }, + "response": [] + }, + { + "name": "Next 48 hours", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/forecasts/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&limit=48&filter=1hr", + "host": [ + "{{env}}" + ], + "path": [ + "forecasts", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + }, + { + "key": "limit", + "value": "48" + }, + { + "key": "filter", + "value": "1hr" + } + ] + }, + "description": "Returns an hourly forecast for the next 48 hours.\n\nFor more information, visit our [forecasts endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/forecasts/) documentation." + }, + "response": [] + }, + { + "name": "Weekly Day / Night", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/forecasts/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&limit=14&filter=daynight", + "host": [ + "{{env}}" + ], + "path": [ + "forecasts", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + }, + { + "key": "limit", + "value": "14" + }, + { + "key": "filter", + "value": "daynight" + } + ] + }, + "description": "Returns a day period (7am - 7pm) and night period (7pm - 7am) for the next 7 days. All times local.\n\nFor more information, visit our [forecasts endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/forecasts/) documentation." + }, + "response": [] + }, + { + "name": "Next 6 Hour Phrase", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/phrases/summary/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}", + "host": [ + "{{env}}" + ], + "path": [ + "phrases", + "summary", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + } + ] + }, + "description": "Provides a phrase to describe the weather conditions over the next 6 hours.\n\nFor more information, visit our [phrases summary endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/phrases-summary/) documentation." + }, + "response": [] + } + ] + }, + { + "name": "Currents", + "item": [ + { + "name": "Conditions", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/conditions/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}", + "host": [ + "{{env}}" + ], + "path": [ + "conditions", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + } + ] + }, + "description": "Returns the current conditions for the location provided.\n\nFor more information, visit our [conditions endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/conditions/) documentation." + }, + "response": [] + }, + { + "name": "Air Quality", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/airquality/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}", + "host": [ + "{{env}}" + ], + "path": [ + "airquality", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + } + ] + }, + "description": "Returns current air quality readings for the provided lcoation.\n\nFor more information, visit our [air quality endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/airquality/) documentation." + }, + "response": [] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] + }, + { + "name": "Summary", + "item": [ + { + "name": "Yesterday's Summary", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/conditions/summary/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&from=yesterday", + "host": [ + "{{env}}" + ], + "path": [ + "conditions", + "summary", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + }, + { + "key": "from", + "value": "yesterday" + } + ] + }, + "description": "Provides the daily summary for yesterday.\n\nFor more information, visit our [conditions summary endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/conditions-summary/) documentation." + }, + "response": [] + }, + { + "name": "Today's Summary", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/conditions/summary/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}&from=yesterday", + "host": [ + "{{env}}" + ], + "path": [ + "conditions", + "summary", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + }, + { + "key": "from", + "value": "yesterday" + } + ] + }, + "description": "Provides the daily summary for today.\n\nFor more information, visit our [conditions summary endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/conditions-summary/) documentation." + }, + "response": [] + } + ] + }, + { + "name": "Severe", + "item": [ + { + "name": "Alerts", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/alerts/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}", + "host": [ + "{{env}}" + ], + "path": [ + "alerts", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + } + ] + }, + "description": "Returns all active alerts for the location provided.\n\nFor more information, visit the [alerts endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/alerts/) documentation." + }, + "response": [] + }, + { + "name": "Tropical Cyclones", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/tropicalcyclones/?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}", + "host": [ + "{{env}}" + ], + "path": [ + "tropicalcyclones", + "" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + } + ] + }, + "description": "Returns all active tropical cyclones around the globe.\n\nFor more information, visit the [tropical cyclones endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/tropicalcyclones/) documentation." + }, + "response": [] + }, + { + "name": "Lightning Strikes", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/lightning/{{location}}?client_id={{CLIENT_ID}}&client_secret={{CLIENT_SECRET}}", + "host": [ + "{{env}}" + ], + "path": [ + "lightning", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{CLIENT_ID}}" + }, + { + "key": "client_secret", + "value": "{{CLIENT_SECRET}}" + } + ] + }, + "description": "Returns all lightning strikes in the last 5 minutes within 25 miles of the location provided.\n\nFor more information, visit our [lightning endpoint](https://www.aerisweather.com/support/docs/api/reference/endpoints/lightning/) documentation." + }, + "response": [] + } + ] + }, + { + "name": "batch", + "request": { + "method": "GET", + "header": [], + "url": { + "raw": "{{env}}/batch/{{location}}?client_id={{client_id}}&client_secret={{client_secret}}&requests=%2Fplaces%2C%2Fconditions%2C%2Fforecasts%2C%2Fforecasts%3Flimit%3D24%26filter%3D1hr", + "host": [ + "{{env}}" + ], + "path": [ + "batch", + "{{location}}" + ], + "query": [ + { + "key": "client_id", + "value": "{{client_id}}" + }, + { + "key": "client_secret", + "value": "{{client_secret}}" + }, + { + "key": "requests", + "value": "%2Fplaces%2C%2Fconditions%2C%2Fforecasts%2C%2Fforecasts%3Flimit%3D24%26filter%3D1hr" + } + ] + }, + "description": "A batch request that combines a places, conditions, and forecasts request. Please note, this batch query still counts as 3 API hits. For best practices, we've encoded the `requests=` parameter.\n\n/places - Geographical information about the queried location\n\n/conditions - Current conditions for the location.\n\n/forecasts - 7 day forecast for the lcoation.\n\n/forecast?limit=24&filter=1hr - Hourly forecast for the next 24 hours.\n\nFor more information, visit the [batch requests](https://www.aerisweather.com/support/docs/api/getting-started/batch/) documentation." + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/AerisWeather API.postman_environment.json b/AerisWeather API.postman_environment.json new file mode 100644 index 0000000..cf42ef2 --- /dev/null +++ b/AerisWeather API.postman_environment.json @@ -0,0 +1,29 @@ +{ + "id": "d73e791f-7169-4cec-b58a-f655d091fb6a", + "name": "AerisWeather API", + "values": [ + { + "key": "env", + "value": "https://api.aerisapi.com", + "enabled": true + }, + { + "key": "CLIENT_ID", + "value": "", + "enabled": true + }, + { + "key": "CLIENT_SECRET", + "value": "", + "enabled": true + }, + { + "key": "location", + "value": "", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2021-03-11T21:33:57.054Z", + "_postman_exported_using": "Postman/7.36.5" +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ab5e317 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +## Using AerisWeather API With Postman + +A quick start guide to using the AerisWeather API with Postman. Check out our [official documentation](https://www.aerisweather.com/support/docs/api/) to discover the powerful features of our API. + +### What You Need + +- Access to [Postman](https://www.postman.com/) via web or desktop app. +- An [AerisWeather account](https://www.aerisweather.com/account/login/) with your client ID and client secret. + +### Importing and Configuring Variables + +Within the Postman application, import the `./AerisWeather API.postman_environment.json` file with the _Manage Environments_ button. Next, select the AerisWeather API environment and update the `CLIENT_ID`, `CLIENT_SECRET`, and `location` variables: + +Now we can import the `./AerisWeather API.postman_collection.json` file with the *Import* option above the collection list. You are now ready to start hitting the AerisWeather API. + +### Example Details + +Be sure to check the request description for details about that request. The collection uses the following endpoints: + +- [forecasts](https://www.aerisweather.com/support/docs/api/reference/endpoints/forecasts/) +- [conditions](https://www.aerisweather.com/support/docs/api/reference/endpoints/conditions/) +- [conditions/summary](https://www.aerisweather.com/support/docs/api/reference/endpoints/conditions-summary/) +- [airquality](https://www.aerisweather.com/support/docs/api/reference/endpoints/airquality/) +- [airquality/forecasts](https://www.aerisweather.com/support/docs/api/reference/endpoints/airquality-forecasts/) +- [phrases/summary](https://www.aerisweather.com/support/docs/api/reference/endpoints/phrases-summary/) +- [alerts](https://www.aerisweather.com/support/docs/api/reference/endpoints/alerts/) +- [tropicalcyclones](https://www.aerisweather.com/support/docs/api/reference/endpoints/tropicalcyclones/) +- [lightning](https://www.aerisweather.com/support/docs/api/reference/endpoints/lightning/) + +Additionally, we include a prebuilt [batch request](https://www.aerisweather.com/support/docs/api/getting-started/batch/) which returns a single response containing a [places](https://www.aerisweather.com/support/docs/api/reference/endpoints/places/), conditions, hourly forecast, and 7-day forecast request. Please note, the batch request will still use 4 API hits. + + +