David Naffis Mar 10
To enable maximum ease of development for existing Twitter API users, Present.ly has an API that is fully compatible with the existing Twitter API structure.
Just as with the Twitter API, the Present.ly API can be accessed via HTTP Basic authentication. The primary difference is that there is no data accessible without authentication in the Present.ly API, since the data is all private.
The URL structure works as follows:
https://<account_name>.presently.com/api/twitter/<twitter url>
So to access, for instance, the friends timeline, you could make a simple API call like so (note that you must have cURL with SSL support enabled):
curl -u <login>:<password> https://<account_name>.presently.com/api/twitter/statuses/fri...
The entirety of the Twitter REST API is available except for the following:
/statuses/featured/account/update_delivery_device/account/rate_limit_status/favorites/* - No favoriting at this time./blocks/* - No blocking at this time./help/test/help/downtime_statusIf you run into problems or need more details about the API's implementation, please contact support@presently.com.
The Present.ly Twitter API has been extended where appropriate to account for features of Present.ly that do not appear in Twitter. Documentation for these features is below.
Because Present.ly offers an integrated home stream with direct messages and group messages, we have added a "receiver" attribute to statuses when a message is a) a direct message or b) a direct message to a group. This is implemented like so:
<status>
...
<receiver>
<type>group</type>
<id>mygroup</id>
</receiver>
...
</status>
Where type could be either "user" for a DM or "group" for a group message.
Present.ly allows for users to attach files to updates. The following are the API methods related to attachments.
<attachment>
<created_at>2008-07-29 19:43:50 UTC</created_at>
<id>6</id>
<content_type>application/msword</content_type>
<file_name>your_file.doc</file_name>
<size>1150976</size>
<url>https://url.of.your.file/</url>
</attachment>
Returns the 20 most recent files attached to updates for the authenticating user's account.
http://<account>.presently.com/api/twitter/attachments.formatParameters:
since: Retrieve only attachments that have been created since the time code specified here.since_id: Retrieve only attachments that have an id greater than this one.since_update_id: Retrieve only attachments that were attached to updates later than the specified update id.page: Optional.user: Retrieve only attachments that were uploaded by the specified user (login or id)group: Retrieve only attachments taht were uploaded by the specified group (login or id)Updates may have additional text attached to them with a number of formatting options. If an update contains a text attachment a "paste" element will be included in the update. The format will be like so:
<paste>
<format>ruby</format>
<text>puts 'this is a text attachment'</text>
</paste>
For more information about the formats available, see Text Attachment Formats.
Present.ly allows users to create groups which may be referred to
Lists out all publicly visible groups for the authenticating user's account in the requested format.
Displays the details of the specified group in the requested format.
Causes the authenticating user to join the specified group. Returns the group that was joined in the requested format.
Causes the authenticating user to leave the specified group. Returns the group that was left in the requested format.
Create a new group.
Requires an authenticated POST with a status parameter that is the message to be broadcasted. If the authenticating user is the manager of the group or an administrator, creates a broadcast update from the group.
Information about your Present.ly account.
Information about the account (only accessible by account administrators).
Requires an authenticated POST with a status parameter that is the message to be broadcasted. If the authenticating user is an administrator of the account, it will send a broadcast update from the system.
Additional methods to leverage the extra functionality provided in Present.ly for statuses.
A list of all of the tags and their counts for this account. Includes the latest update for a given tag.
Show all updates for a given tag.
If a user has attached a file to a Present.ly update, it will be inlined as "attachment" in XML or JSON. An update may only have a single attachment.