By Tom Johnson, idratherbewriting.com
For an API, it’s all about the documentation. If an API feature is missing from the documentation, it might as well not exist. — Ruben Vermeesch
APIs are the inter-connector which provide the interface between the Internet and the Things. JavaWorld’s Andrew Oliver calls APIs “the glue and interesting part where the Internet of Things starts to become useful and more than a buzzword.” APIs expose the data that enables multiple devices to be combined and connected to solve new and interesting workflows. — Nordic APIs
{
"success": true,
"error": null,
"response": {
"id": "KSJC",
"loc": {
"long": -121.91666666667,
"lat": 37.366666666667
},
"place": {
"name": "san jose",
"state": "ca",
"country": "us"
},
"profile": {
"tz": "America/Los_Angeles",
"elevM": 24,
"elevFT": 79
},
"obTimestamp": 1455774780,
"obDateTime": "2016-02-17T21:53:00-08:00",
"ob": {
"timestamp": 1455774780,
"dateTimeISO": "2016-02-17T21:53:00-08:00",
"tempC": 11,
"tempF": 52,
"dewpointC": 8,
"dewpointF": 46,
"humidity": 82,
"pressureMB": 1005,
"pressureIN": 29.68,
"spressureMB": 1002,
"spressureIN": 29.59,
"altimeterMB": 1005,
"altimeterIN": 29.68,
"windKTS": 9,
"windKPH": 17,
"windMPH": 10,
"windSpeedKTS": 9,
"windSpeedKPH": 17,
"windSpeedMPH": 10,
"windDirDEG": 80,
"windDir": "E",
"windGustKTS": null,
"windGustKPH": null,
"windGustMPH": null,
"flightRule": "LIFR",
"visibilityKM": 16.09344,
"visibilityMI": 10,
"weather": "Cloudy with Light Rain",
"weatherShort": "Light Rain",
"weatherCoded": ":L:R,::OV",
"weatherPrimary": "Light Rain",
"weatherPrimaryCoded": ":L:R",
"cloudsCoded": "OV",
"icon": "rainn.png",
"heatindexC": 11,
"heatindexF": 52,
"windchillC": 11,
"windchillF": 52,
"feelslikeC": 11,
"feelslikeF": 52,
"isDay": false,
"sunrise": 1455720807,
"sunriseISO": "2016-02-17T06:53:27-08:00",
"sunset": 1455760184,
"sunsetISO": "2016-02-17T17:49:44-08:00",
"snowDepthCM": null,
"snowDepthIN": null,
"precipMM": 0.001,
"precipIN": 0.001,
"solradWM2": null,
"light": 0,
"tempMax6hrC": 18.3,
"tempMax6hrF": 65,
"tempMin6hrC": 10.6,
"tempMin6hrF": 51,
"sky": 100
},
"raw": "KSJC 180553Z 08009KT 10SM -RA FEW013 SCT036 OVC070 11/08 A2968 RMK AO2 RAB0455E12B45 SLP049 P0000 60013 T01110083 10183 20106 51044",
"relativeTo": {
"lat": 37.35411,
"long": -121.95524,
"bearing": 68,
"bearingENG": "ENE",
"distanceKM": 3.684,
"distanceMI": 2.289
}
}
}
Wind conditions for Santa Clara
Wind chill:
Wind speed:
Wind direction:
api_site.com/{apikey}/users
// gets all users
api_site.com/{apikey}/users/{userId}
// gets a specific user
api_site.com/{apikey}/rewards
// gets all rewards
api_site.com/{apikey}/rewards/{rewardId}
// gets a specific reward
api_site.com/{apikey}/users/{userId}/rewards
// gets all rewards for a specific user
api_site.com/{apikey}/users/{userId}/rewards/{rewardId}
// gets a specific reward for a specific user
api_site.com/{apikey}/users/{userId}/rewards/{missionId}
// gets the rewards for a specfic mission related to a specific user
api_site.com/{apikey}/missions/{missionid}/rewards
// gets the rewards available for a specific mission
/surfreport/{beachId}?days=3&units=metric&time=1400
/surfreport/{beachId}?time=1400&units=metric&days=3
/campaigns/{campaign_id}/actions/send
{
"days": 2,
"units": "imperial",
"time": 1433524597
}
See also Twilio
Authorization: Basic bG9sOnNlY3VyZQ==
See also the Shopify cheat sheet.
Tom Johnson
— idratherbewriting.com
— @tomjohnson
— [email protected]