We field all kinds of questions in the discussion groups, usually resulting in small snippets of code that aren't easy for other people to find. So we decided to start up a Tips Blog for all the Google Data APIs.
For example, do you know how to perform a GET with a POST? Since Flash doesn't allow a custom Authorization header on a GET, sometimes you need to do a GET with a POST using the X-HTTP-Method-Override header. Here it is in action, performing a search for kitten videos using the YouTube Data API:
POST /feeds/api/videos HTTP/1.1
Host: gdata.youtube.com
X-HTTP-Method-Override: GET
Content-Length: 23
Content-Type: application/x-www-form-urlencoded
vq=kitten&max-results=1
This is the same as performing a GET on http://gdata.youtube.com/feeds/api/videos?vq=kitten&max-results=1. The POST body is used as the set of query parameters. You can also do this using the curl command:
curl -H "X-HTTP-Method-Override: GET" -X POST http://gdata.youtube.com/feeds/api/videos -d "vq=kitten&max-results=1"
Want to subscribe to tips for your favorite API? Blogger (since it's a Google Data API, naturally) allows you to use the category filters to customize the feed and throw it into your feed reader of choice. For example, to get all tips for YouTube, use:
http://gdatatips.blogspot.com/feeds/posts/default/-/youtube
If you only want PHP tips for YouTube, you can further filter the labels:
http://gdatatips.blogspot.com/feeds/posts/default/-/youtube/php
Or, of course, you can subscribe to the whole thing by just using the base feed:
http://gdatatips.blogspot.com/feeds/posts/default/

2 comments:
What is an API? The only thing that comes to my mind is the word, application. Yes, I am new to this and am trying to place a Google calendar and a Google map on our church website. Thus far, I have not met with much fortune, but I will get it sooner or later.
Carol
sohbet
sohbet
Mp3
Mp3
Fıkra
güzel sözler
nur sohbet
guzel sozler
Arkadaşlık Siteleri
Sohbet Ekle
islami sohbet
IRCAsk Forum
IRCAsk Directory
Post a Comment