All posts tagged ‘API’

File Under: APIs, Social, Web Services

Google Buzz Turns on the Firehose

Google has added a feature to its Buzz API that publishes every activity as it happens in a single feed.

On the social web, this is commonly called a “Firehose” — a syndication feed that publishes all public activities as they happen in one big, fat stream. It’s a lot to sift through, but app developers consider a firehose essential for incorporating real-time search results and real-time “trending” lists from a particular social service into their creations.

Google Buzz, the company’s answer to Twitter and other real-time social sharing services, launched in February, and the API was opened up to the public in May. The firehose was made available late Monday, and it publishes everything Buzz users are sharing (except for Twitter tweets). Google says it’s Buzz developers’ most-requested feature. Previously, you could run searches on Google Buzz activity, but there was no way to subscribe to a feed that publishes what everyone on Buzz is talking about or sharing at any given moment with very low latency.

Some Google partners were involved in the launch, and they’ve prepped some apps to show off what the firehose can do. Have a look at Buzz Mood, an app (obviously inspired by our old Twitter favorite Twistori) that tracks emotional keywords like “love,” “hate,” “believe,” and “hope,” showing you the most recent posts containing those words in a constantly refreshing stream.

Also check out Gnip, the social aggregation service that collects user activities from Twitter, MySpace, Buzz, Facebook, Digg and over 100 social sites. Gnip republishes all these feeds in multiple formats and combinations, and it makes everything — now including the Buzz firehose — available to its customers via its own API.

All of the public activities in Google Buzz are published through the firehose using PubSubHubbub, a protocol that’s being widely adopted on the social web. PubSubHubbub, which was created inside Google and is now being developed into an open standard, pushes out updates to apps as they happen. It replaces the old model — one that’s been the standard for many years — where an application repeatedly asks the publishing server if there’s anything new.

PubSubHubbub is more efficient and provides the app with notifications the instant they happen. It’s not the only data format for real-time publishing: also have a look at RSSCloud.

Google is turning on some other API features as well, including a comments feed for comments left by each user, and a similar feed for “likes” made by each user.

Google is using Activity Streams, another emerging standard on the social web, to wrap all of the activity data. The AML-based Activity Streams format allows for notifications of things like comments, likes, and favorites. So, subscribe to the Google Buzz feed for so-and-so, and you’ll not only be notified that so-and-so posted a video, but also that his friend liked that video, or that an hour later, somebody else left a comment about it.

Everything is outlined in the Google Buzz API docs. You can also ask a question or search for answers in the Buzz developer forum.

See Also:

File Under: APIs, Programming

Google Moderator API Lets Your Apps Ask Questions

moderatorandroidGoogle has announced a new API that lets third party code tap into the company’s Moderator service. Google Moderator is designed to help collect questions from users — questions for live speakers from meetings, conferences, Q&A sessions and the like.

The new Moderator API allows outside apps to access, update, and participate in Google Moderator through custom interfaces.

For the launch, Google showcased a gadget for Google Wave that will be available at the upcoming Google I/O conference, allowing attendees to ask questions. A Google engineer also developed a Moderator app for Android and there’s also a cool Maps mashup that plots questions for the White House on a Google Map.

The API offers hooks into standard Moderator events, allowing third party apps to create new Moderator topics, ask questions and cast votes on behalf of the currently authenticated user. Even better for conference organizers and speakers on stage, the API allows apps to aggregate votes, making it easier figure out which questions are most important to your audience.

If you’d like to know more, head over to Google Moderator’s new API page where you’ll find the full details on the new API along with some sample applications.

See Also:

File Under: APIs

Dropbox API Lets You Add Cloud Storage to Your Apps

dropboxDropbox, the free, web-based file backup service, has rolled out a new API that gives developers a way to access, edit and save any file in a user’s Dropbox account.

The Dropbox API works a bit like an Amazon S3 storage bucket except that you, not the application in question, have control over your uploaded files.

The Dropbox API uses familiar tools like JSON, OAuth and OpenID, so web developers can essentially offload their user’s storage needs to Dropbox. For users, the usual risks of tying your web app to a cloud storage mechanism are mitigated by the fact that Dropbox keeps a local copy on your hard drive.

While the potential for integration with web apps is very cool — imagine if all your Flickr uploads automatically synced to the Dropbox folder on your hard drive for an instant backup — the first place you’ll likely see the Dropbox API in action is on mobile devices.

Storage limitations and, in the case of the iPhone/iPad, Apple’s imposed restrictions, mean that it’s difficult to build mobile apps that can access local files, let alone read, write and sync.

That’s the basic problem the Dropbox API seeks to overcome — using the Dropbox API means there’s no need for local files on your mobile device and everything is automatically synced back to your PC. The only catch is that you need an internet connection for the syncing to work.

Dropbox has already worked with a number of developers to integrate the new API prior to the launch. For example, Air Sharing, GoodReader and QuickOffice can now tap into your Dropbox account to edit and sync your Dropbox files. The new API ships with client libraries in Objective-C (pretty much required for the iPhone/iPad), Python, Ruby and Java. To create an application you’ll need to register with Dropbox and then, once you have access, you can grab the client library of your choice and check out the online documentation.

See Also:

File Under: Glossary

API

The application program interface (API) is a set of building blocks for programmers.

APIs are made up of routines, protocols, and tools. Most operating environments provide an API so that programmers can write applications consistent with that environment. For example, developing software using the Windows API ensures that your user interface will be consistent with other Windows applications, making it easier for users to learn your new programs.

Use on the Web

Web APIs provide simple ways to interact with websites. Using an API, you can extract public data from sites like del.icio.us, Flickr and Digg to create mashups, reuse data or just about anything else you can imagine.

APIs are also useful for extracting your own private data from a web service so that you can back it up elsewhere or display it on another site.

When talking about APIs you’ll here the following terms quite a bit.

Common Web API Related Terms

  • Web service/API — These terms are largely interchangeable and simple refer to the ways you can interact with the data on your favorite websites.
  • Method — A method is just one aspect of an API; you might also see methods refered to a functions. For instance, if you’re interacting with Flickr, you might want to get your public photos. To do so you would use the get_user_photos method.
  • Response — The information returned by the API method that you’ve called.
  • REST — Short for Representational State Transfer. REST treats data as a web document that lives at a specific URL. REST APIs use standard HTTP requests such as GET, PUT, HEAD, DELETE and POST to interact with data.
  • XML-RPC — This older API scheme formats method calls and responses as XML documents which are sent over HTTP.
  • SOAP — Simple Object Access Protocol. A W3C standard for passing messages across the network. SOAP is the successor to XML-RPC. It’s complexity has led many to disparage SOAP and with more APIs leaning toward REST, SOAP’s future is uncertain.
  • Ajax — Asynchronous JavaScript and XML. Technically it has nothing to do with APIs, however many sites using APIs send their queries out using Ajax which is partially responsible for the popularity of JSON.
  • JSON — JavaScript Object Notation. JSON’s main advantage is that it is easy to convert from JSON to nearly any other programming language. JSON uses key-value pairs and arrays, something common to PHP, Python, Perl, Ruby and most other languages. The portability of JSON has made it an increasingly popular choice for sites developing APIs.


Popular Web APIs

File Under: Glossary

Platform


Software developers need to know which platform their software will be running on. A platform can be an Intel processor running Windows, a Macintosh running System 8, or any combination of hardware and software that works together. Platforms are important for web designers to understand, because they need to make sure their pages will work on more than one platform. Different browsers display web pages differently on various platforms. Since the internet itself is a cross-platform system, designers need to test web pages on different combinations of machines and browsers to ensure the widest possible audience will be able to view their sites.

File Under: APIs, Location

Yahoo Maps API

This is the basic structure of a data call to Yahoo Maps’ API. This will draw a 500px by 300px map centered on Wired’s San Francisco offices, complete with zoom and pan controls. When the user clicks on the location marker, a pop-up box will appear with some text inside.

All of these attributes can be changed by modifying the code below. You’ll need to use your own API key.


Continue Reading “Yahoo Maps API” »

File Under: APIs, Location

Using the Yahoo Maps API

Yahoo’s Maps API may not be as popular as Google’s mashup mainstay, but it has many of the same features. In some ways, it’s even easier to use than Google’s Maps API, so beginners getting started with API interaction might prefer Yahoo’s implementation.

To get started working with Yahoo maps, we’ll simply create a map we can display on a web page, and then add a marker to denote a particular location.


Continue Reading “Using the Yahoo Maps API” »
File Under: APIs, Location

Get Started With Google Geocoding via HTTP

Google’s mapping API is one of the most-used application interfaces on the web. It’s largely responsible for the recent explosion of map-based mashups. The massive popularity of Google Maps has also given rise to a new word in the web developer’s lexicon — geocodes.

Maps require a latitude and longitude point to plot specific locations. Whenever you’re programming a custom map using Google’s API, you will nee to convert the relevant city name, ZIP code, or address to latitude and longitude points. This process is called geocoding.

Google currently makes the process available via the GClientGeocoder Javascript class. That JavaScript class makes the geocode available immediately to the browser. But sometimes, such on the fly access isn’t enough. We want to store location information for later use. In that case, we need another service to grab the geocodes permanently.

That’s where geocoding via HTTP comes in handy.

Continue Reading “Get Started With Google Geocoding via HTTP” »
File Under: APIs, Location

Get Started With the Yahoo HTTP Geocoder API

Since the major search engines have opened up their mapping tools to programmers, geocoding has become an essential step in the process of building many a mashup.

Geocoding is the process of converting human-readable place data — a city name, ZIP code, or address — to latitude and longitude points that can be easily plotted on a map.

Yahoo’s HTTP Geocoder API is easy to use, and its output is easy to incorporate into your applications. This article will describe its features and show some examples of how to access the results.


Continue Reading “Get Started With the Yahoo HTTP Geocoder API” »

File Under: APIs

Using the Twitter API

The microblogging site with the funny name is one of the hottest web services around.

Twitter is one of those websites with very little room for functional nuance. Its limit of 140 characters per post forces users to be succinct, something that makes many people feel over-constrained and leads them to view the service as too simple to actually be useful. Others see unbridled freedom inside such a unique limitation and embrace it like a poetic device. The lesson: You either get Twitter or you don’t.

Regardless of how you feel about it, if you’re looking to try out an API for the first time, Twitter is a great place to start.


Continue Reading “Using the Twitter API” »