Showing posts with label Feed API. Show all posts
Showing posts with label Feed API. Show all posts

Fall Housekeeping

November 1, 2010

When we introduced this blog over four years ago, the term AJAX was only a year old, and Google had exactly one relevant API . Ajax has since become a mainstream part of the Web, and our family of APIs has grown. Like many growing families, we’ve accumulated a lot of cruft over the years, and have outgrown our first home. Time for some housekeeping.

API Documentation - Now easier to find and use
We’ve reorganized our documentation to make it easier to find what you’re looking for, based on what you want to do. We used to group our APIs based on technology - for instance, there were Google Data APIs and AJAX APIs. Now, you’ll see that each API has been given its own place, including its own documentation pages. This new documentation has been created from the ground up to provide a better experience for people coding against the APIs. We’ve also organized these more logically by product, such as moving the Book Search API into the Books family of APIs, and added many more samples to help you get started.

A fond farewell
In the spirit of consolidation, we’ll be retiring this blog in favor of the Google Code Blog. By concentrating on fewer blogs, we’ll be able to keep the blog fresher and help make sure that as wide an audience as possible is able to benefit from our posts. We’ll continue using tags, so that you can subscribe to your favorite APIs and focus on the content that most interests you (though we hope you’ll check in occasionally to see what new stuff you might be missing).

Show your support for the Code blog by hopping over to read about the new Google APIs console and Custom Search API, and also say good-bye to the Web and Local Search APIs, which are being deprecated. Full post here.

Posted by: Adam Feldman, Product Manager

Google Feed API — Now with instant gratification

May 19, 2010

One of Google's most popular APIs is our Feed API. This API is found all over the web, making any feed content available for developers to embed on their sites.

A problem with embedding content in this manner is that there's no good way to make sure that your visitors see the freshest data, regardless of how long they stay on your page. Of course, you could try polling (also known as the "are we there yet?" method), repeatedly reloading the feed to see if the content has changed. This technique is generally a waste of bandwidth and doesn't always result in very low latency.

Instead, we've got something better. I'm pleased to announce a preview of a brand new version of the Feed API, which includes push updates. With this new version, you'll be able to make the latest feed data available to your visitors - when it's available - without polling or requiring a page refresh. The best part is that this will work with any PubSubHubbub enabled feed.

Here's a short demonstration of what I'm talking about:
video

As the video shows, this new version works much like the older Feed API. But instead of loading the existing feed data, you actually subscribe to the feed, and your callback is executed any time new feed data comes in.

Let's see how this works. First, you must load the API (just like before, except now v2):

google.load("feeds",  "2");
Now, subscribe to the feed you're interested in and give the callback to be executed:
var feed = new google.feed.push.Feed("example.com/atom.xml");
feed.subscribe(myCallback);
And, finally, you need to write the callback method that is run every time there's an update. In this example, we just display each new entry title as it comes in:
function myCallback() {
var container = document.getElementById("feed");
for (var i = 0; i < result.feed.entries.length; i++) {
var div = document.createElement("div");
div.appendChild(document.createTextNode(result.feed.entries[i].title));
container.appendChild(div);
}
}
For a running example you can try out, check out the Code Playground.

We want to encourage you to experiment and build innovative applications with this new API - but since we don't know how it will be used, we can't quite open the floodgates yet. Therefore, we're initially making it available on a sign-up basis. Please fill out this form, telling us a little about how you'd like to use this API, and we'll try to give you access as soon as possible. Also, please remember that this is a Code Labs version, and therefore it may change or be removed at any time.

After we get some data from this experimental period we'll be able to open it up to everyone. Once you've begun experimenting, be sure to stop by our support forum or IRC channel to share your creations with everyone. If you'd like to learn more about how this API works, our Google I/O session will be posted to YouTube soon.


Posted by: Brett Bavar, Software Engineer and Adam Feldman, Product Manager

Media RSS support added to the Feed API

April 8, 2010

More and more sites are adding support for MediaRSS to include images, videos and other types of multimedia files. Today, we're announcing that the Google Feed API now includes this metadata in the response. This content is now included in the JSON and XML results returned by the API. For more details on the result format, check out the documentation.

Please note that complete MediaRSS content is generally only available in feed entries newer than February 1, 2010.

Questions? Comments? If you're attending Google I/O, come meet the team and learn more about the Feed API at our Office Hours. If you can't wait that long, there's always our IRC channel and support forum.