Message - Ohloh API Reference

Avatar
written by Robin Luckey
jun 19 2008

Message

A Message record contains contains an individual entry from an Ohloh account "journal".

Properties

id
The unique ID of the message.

account
The login of the Ohloh account that generated this message. The uri attribute contains a link to the account itself. Note that the login is not the same as the account name. The login is used when you wish to tag a message with a particular account.

avatar
The uri attribute is a pointer to account avatar image.

created_at
The creation timestamp of this message.

body
The text of the message.

tags
A message can be optionally tagged with links to several accounts or projects. The <tags> element contains a collection of zero or more <account> and/or <project> elements, as defined below.

tags/account
The element text contains an account login. The uri attribute is a link to the Ohloh account itself.

tags/project
The element text contains a project name. The uri attribute is a link to the Ohloh project itself.

URL

To get a single message:

GET http://www.ohloh.net/accounts/{account_id}/messages/{message_id}.xml

Note that you must correctly specify both the account_id of the message author as well as the message_id.

Collection URL

To get a paginated list of messages created by a single account:

GET http://www.ohloh.net/accounts/{account_id}/messages.xml

To get a paginated list of message tagged with a particular project:

GET http://www.ohloh.net/projects/{project_id}/messages.xml

The messages will be sorted with newest messages first.

Creating New Messages

If you provide OAuth credentials, you can post a new message on a user's behalf:

POST http://www.ohloh.net/accounts/me/messages.xml

Your POST must contain a form parameter called message[body] which contains the text of the new message. Messages are limited to 400 characters.