Example Webservice / API call- OpenWeatherMap Forecast & Current conditions

Continuing with the examples shown in our webinar on Webservice APIs below I demonstrate how to use OpenWeatherMap’s API.

Here is the code I reviewed in the video demonstrating the various API calls.

 

Example API call to OpenWeatherMap

Example Webservice / API call- OpenWeatherMap Forecast & Current conditions

Example Webservice / API call- Extract JSON & Binary data from Smartsheets

In the webinar on APIs we discuss various types of data extraction but I don’t think I mentioned that you can also download binary data.  In this example I demonstrate how to connect to the SmartSheets API and extract both JSON (I also demoed this FormatJson function by tmplinshi which made the JSON much easier to read) and binary data (in this case a csv file).  Here is the AutoHotkey script I used during the below video:

 

 

Video demonstrating example API Call

Example Webservice / API call- Exporting JSON and binary data from SmartSheets

Example API Call- Top Reddit post to AutoHotkey subreddit

As we mentioned in our webservice / API webinar most APIs require Authentication.   In this example I noticed the number of records being returned by the API call was not nearly as many as when I did the same call with my browser  (I think this is because I didn’t bother to use my secret/token for oAuth2.)

I decided to use the developer tools in Chrome to see what headers were being sent to reddit.   Once I included the cookie header (data borrowed from my browser) I was returning a ton of data!  I also demonstrated the use of sXML_Pretty function by VxE to re-structure the XML to be “pretty” for humans.

Here is the video where I document the Example API Call and show how to use the Chrome Developer tools

Example Webservice / API call- Top post on AutoHotkey reddit

Example API call- phone number to email address

In the below code I continue on the with examples that we talked to during our webinar on Example API calls.  In the below code I demonstrate a service that allows you to return an email address for a mobile phone number.  This allows you to “email” a “text” to a phone!

Example API Call: emailing a text to a phone

 

 

 

Example API call to get an email address associated to a phone number

Example Webservice / API call- phone number to email address for mobile phones