Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 2 KB

messages.md

File metadata and controls

97 lines (64 loc) · 2 KB

Messages

Create a message

POST /projects/{project_id}/posts.json

tw.projects.createMessage(project_id, {
	"post": {
		// --
	}
})

Retrieve a Single Message

GET /posts/{id}.json

tw.messages.get(message_id)

Retrieve Latest Messages

GET /projects/{project_id}/posts.json

tw.projects.getMessages(project_id, false)

Retrieve Messages by Category

GET /projects/{project_id}/cat/{category_id}/posts.json

tw.projects.getCategoryMessages(project_id, category_id, false)

Update message

PUT /posts/{id}.json

tw.messages.update(message_id, {
	"post": {
		// --
	}
})

Get archived messages

GET /projects/{project_id}/posts/archive.json

tw.projects.getMessages(project_id, true)

Get archived messages by category

GET /projects/{project_id}/cat/{category_id}/posts/archive.json

tw.projects.getCategoryMessages(project_id, category_id, true)

Archive a message

PUT /messages/{id}/archive.json

tw.messages.archive(message_id)

Un-archive a message

PUT /messages/{id}/unarchive.json

tw.messages.unArchive(message_id)

Destroy message

DELETE /posts/{id}.json

tw.messages.delete(message_id)

Mark Message Read

PUT /messages/{id}/markread.json

tw.messages.read(message_id)