Incarnate REST Service

http://incarnate.visitmix.com is the home of the Windows Azure based instance of the Incarnate REST Service.  There is no user experience on this domain; it is purely a REST servive with a series of endpoints discussed below. If you are looking for more information about Incarnate such as Javascript and HTML samples for Incarnate, please see http://visitmix.com/labs/incarnate.

Endpoints

The Incarnate REST Service supports finding and returning Avatars from various "Avatar providers" on the web. 

To get the avatar image from a given provider, the following JSON and JSONP calls are available:

http://incarnate.visitmix.com/incarnate/{provider}/{userName} (JSON)

http://incarnate.visitmix.com/incarnate/{provider}/{userName}?callback={callback} (JSONP)

Where {provider} is the name of the avatar provider and {username} is the handle of the of user, which typically resolves to a vanity URL of the provider (http://{provider}.com/{username} aka http://twitter.com/bob or http://myspace.com/alice.

So, an example of a JSON call to get an Avatar from Twitter would look as follows:

http://incarnate.visitmix.com/incarnate/Twitter/irhetoric

That call returns the following result:

"http:\/\/a1.twimg.com\/profile_images\/27622302\/flower3_normal.jpg"

This result represents the URL to that user's avatar, escaping the forward slashes.

An example of a JSON-P call to get an Avatar from YouTube would look as follows:

http://incarnate.visitmix.com/incarnate/YouTube/irhetoric?callback=cb

That call returns the following result:

cb( "http:\/\/i1.ytimg.com\/i\/00n45GiohDCYnGPHFjqVOg\/1.jpg" );

The Incarnate service will always return a string (absolute URI) to the image of the avatar.

If the service cannot find an avatar for the username, it will return null.

To get the list of supported providers of the Incarnate service, use the following call:

http://incarnate.visitmix.com/incarnate/providers (JSON)

So, an example of a JSON call to get the list of providers would look as follows:

http://incarnate.visitmix.com/incarnate/providers

That call returns the following result:

["MySpace","Facebook","XBoxLive","Twitter","YouTube","Gravatar"]

The final call available from the Incarnate service is a hashing service that supports JSON-P.  This could be handy for anyone out there that wants to work with Gravatar.  The call looks as follows:

http://incarnate.visitmix.com/incarnate/GetHash?callback=cb&email=bob@test.com

This call returns the following:

"ebf3a1ca1e3ca553e2bd873b3cd96390"

 

A Note on Caching

The Incarnate service aggressively caches using the ASP.NET cache object.  How and when things are cached are determined by the underlying algorithms ASP.NET uses for the cache object. 

Additional Information

Additional information about Incarnate can be found at http://visitmix.com/lab/incarnate.