The goal of the Twitter-ish API is to make it extremely easy for developers with tools that already talk to Twitter to communicate with Laconica sites as well. The most used methods will be implemented first.
The official Twitter API wiki is a good place to start for information about this API. We intend to provide full documentation on this site, but for now will have the exceptions. The following will be mostly useful for devs experienced with the Twitter API and getting ready to build in Identi.ca compatibility.
The API root for identi.ca is at http://identi.ca/api.
To make API calls you tack on the method name. Examples:
http://identi.ca/api/statuses/public_timeline.xml http://identi.ca/api/statuses/show/123.xml http://identi.ca/api/friendships/exists.json?user_a=bob&user_b=doug
For other Laconica installs, the API root will be determined by whatever you set your $config['site']['server'] and $config['site']['path'] variables to in config.php. Generally, the pattern is:
So if your site server name is www.gar.org and the path to your Laconica install is laconica, your API root will be:
As with Twitter, the API uses HTTP Basic Authentication. Note that this means that users with only an OpenID login cannot use the API; they have to add a password to their account using the control panel on the site.
There’s no support for other, undocumented authentication methods.
For API methods that return JSON, an optional JSONP-style callback parameter is supported. If supplied, the response will be in JSONP format with a callback of the given name. (Note: this is actually an undocumented feature of Twitter’s API.)
We currently don’t enforce any rate-limiting. Please don’t make us regret it.
Some things to remember:
- Laconi.ca supports OpenMicroBlogging and some notices and friends may come from other servers.
- On Laconi.ca sites, user nicknames are unique, but they are not globally unique. Use the ID number instead.
- Private streams are not implemented on Laconi.ca yet.
|Public timeline||As documented, except: does not support ‘since’ parameters.|
|Friends timeline||As documented, except: does not support the ‘since’ parameter.|
|User timeline||As documented, except: does not support the ‘since’ parameter.|
|Update||As documented, including support for ‘in_reply_to_status_id’ parameter.|
|Replies||As documented, except: does not support the ‘since’ parameter.|
Note: As of Laconica 0.6.1, status methods support the ‘since_id’ parameter, which returns statuses with an ID greater than (more recent than) the specified ID. Additionally, they support a ‘before_id’ parameter, which returns all the notices before a given ID. ‘before_id’ is an extension to Twitter’s API.
|Friends||As documented, except: does not support the ‘since’ or ‘lite’ parameters. Also, ordered by subscription and not signup date.|
|Followers||As documented, except: does not support the ‘since’ or ‘lite’ parameters. Also, ordered by subscription and not signup date.|
|Featured||Not implemented. Robert Scoble gets too much attention as it is.|
|Show||As documented. However, if the user cannot be found, a 404 error will be returned, unlike Twitter, which returns a random(?) user in that event. Also, you can bring up a user by email address alone. A user id is not required if an email address is supplied.|
Direct message methods
Supported as of Laconica 0.6.1.
|direct_messages||As documented, except: does not support the ‘since’ and ‘since_id’ parameters.|
|sent||As documented, except: does not support the ‘since’ and ‘since_id’ parameters.|
|create||As documented. Note that users cannot subscribe to remote profiles using this API.|
|destroy||As documented. Users can unsubscribe to a remote profile using this API, but it’s preferred to use numeric IDs to nicknames.|
Supported as of Laconica 0.6.1.
Laconica does not support blocks yet.