Skip to content
funkatron edited this page May 21, 2011 · 8 revisions

Internally we use a common format for statuses/messages/items from various services. This allows us to keep things a little simpler. The format isn't set in stone, and will probably need to be added to as we add new formats. For now, here's what we have:

{
	account_id	// the local account from which the entry is showing up for
	service         // the service this entry originated from
	service_id      // the ID of the entry as assigned by the service
	spaz_id         // a unique ID generated by Spaz
	text            // the text of the message. this may be changed to add html formatting, etc
	text_raw        // the raw text of the entry. this should never be changed
	publish_date    // a unix timestamp
	_orig           // the original entry, as it came from the service

	author_username      // the author's username on the service
	author_description   // the author's description/profile (MAY BE UNDEFINED)
	author_fullname      // the author's username on the service (MAY BE UNDEFINED)
	author_id       // the service's ID for the user
	author_avatar   // the avatar URL for the author
	author_avatar_bigger // bigger avatar URL for the author
	
	// reply_to_id is only set when a message is a direct reply to another message
	in_reply_to_id       // the ID of the entry being replied to as assigned by the service

	// boolean set if the message is private message ("direct message" in Twitter terms)
	is_private_message

	// boolean set if the message is directed to or mentions the user
	is_mention

	// boolean set if the message is a repost
	is_repost
	
	//if is_repost is true
	reposter_username	// reposter's username on the service
	reposter_description	// reposter's description
	reposter_fullname	// reposter's fullname
	reposter_id		//
	reposter_avatar		// reposter's avatar
	repost_orig_date	// unix timestamp of original entry's posting
	repost_orig_id          // the service_id of the original entry

	// recipient data is only set for entries directed at a particular user
	recipient_username    // the recipient's username on the service
	recipient_description // the recipient's description/profile (MAY BE UNDEFINED)
	recipient_fullname    // the recipient's username on the service (MAY BE UNDEFINED)
	recipient_id     // the service's ID for the recipient
	recipient_avatar // the avatar URL for the recipient (MAY NOT BE SET)
}
Clone this wiki locally