Try this first
Then
I wrote a lengthy example of using a particular API but any API is going to work based on the same principals.