A Twittervision API?
Yes, it's time. We wanted to publish easy ways for people to work with the location-based information available through Twittervision and Twittermap. This is a start. There is more coming.
Get the Current Location & Status of a User
http://twittervision.com/user/current_status/screen_name.xml
http://twittervision.com/user/current_status/screen_name.json
http://twittervision.com/user/current_status/screen_name.yaml

Simply replace screen_name with the screen name of the user you wish to locate. No authentication is necessary. You can retrieve status in either XML, JSON, or YAML formats.

If you supply the .json form of the call with the parameter callback, the JSON data will be returned enclosed by a call to that function. This would be particularly useful for creating javascript-based badges.

Update Your Current Location
http://twittervision.com/user/update_location.xml
http://twittervision.com/user/update_location.json
http://twittervision.com/user/update_location.yaml

parameters:  location=Your current location

The locations you specify can be any Twittervision-comapatible geocodable location. For more information on acceptable location formats, please see our FAQ and Location Examples. If you want to easily test whether a particular string is useable with Twittervision, the easiest way is to search for that location with Twittermap, our Twitter geographic search engine. Addresses, postal codes, and common identifiers like airport codes can all be used, as can lat/long coordinates.

Basic authentication (using your Twitter username/password) is used to verify your identity. So, to easily update your location with curl, you could do this (all on one line of course):

curl -umyusername:mypassword
  http://twittervision.com/user/update_location.xml
  -dlocation=90210

Be sure to URL-encode your location data if necessary. In response you will get your current status, which will reflect your updated location.

Why use the Twittervision API?
The Twittervision API is focused on providing valid current location information. This makes the Twittervision API perfect for your badges and for generally publishing your current location.
How can I get more information about the API?
Contact us at dave at twittervision.com and we'll be happy to answer any questions.
Back to Twittervision
© 2007-2008 David Troy