Skip to content

REST Interface: Accent

MikeKlemarewski edited this page Jul 26, 2012 · 24 revisions

Questions

see REST Interface: Presenter

Comments

see REST Interface: Presenter

Follower

Add Follower (Work in Progress)

  • adds a follower to a question tag
  • command: PUT /api/question/:uid/follow/:follower
  • response: ???

Remove Follower (Work in Progress)

  • adds a follower to a question tag
  • command: DELETE /api/question/:uid/follow/:follower
  • response: ???

Tag

Get a tag based on the ID

  • retrieve a tag
  • command: GET /api/tag/:id
  • response: {errorcode: 0, tag:{...}}

Add Tag

  • adds a tag to a MediaFile
  • command: POST /api/tag
  • response: {errorcode: 0, tag:{...}}

Update Tag

  • update a tag based on the id
  • command: PUT /api/tag/:id
  • response: {errorcode: 0, tag:{...}}

Delete Tag

  • remove a Tag
  • command: DELETE /api/tag/:id
  • response: {errorcode: 0, tag:{...}}

MediaFile

Get a MediaFile based on the ID

  • retrieve a media file
  • command: GET /api/mediafile/:id
  • response: {errorcode: 0, mediafile:{...}}

Add MediaFile

  • adds a media file
  • command: POST /api/mediafile
  • request:
{
    title: "new media title"
    course: "1A2B-3C4D-5E6F-7G8H"
    description: "Double rainbow all the way!"
    path: "/path/to/media/file"
    type: 0
}
  • response: {errorcode: 0, mediafile:{...}}

Update MediaFile

  • update a media file based on the id
  • command: PUT /api/mediafile/:id
  • response: {errorcode: 0, mediafile:{...}}

Delete MediaFile

  • remove a media file
  • command: DELETE /api/mediafile/:id
  • response: {errorcode: 0, mediafile:{...}}

Get all Tags by MediaFile ID

  • retrieve all the tags from the media file
  • command: GET /api/mediafile/:tid/tags
  • response: JSON data of the tags

Get all Questions by MediaFile ID

  • retrieve all the tags from the media file
  • command: GET /api/questions/mediafile/:tid
  • response: {errorcode: 0, questions:[{...},{...}]}

##Conversations

Get Users Conversations For Media File

  • Returns a list of conversations for a specific media file, as well as all conversations that the user has participated in
  • command: GET /api/user/:uid/conversations/
  • reponse: {errorcode: 0, mediaQuestions:[{...},{...}], userQuestions:[{...},{...}]}
Clone this wiki locally