-
Notifications
You must be signed in to change notification settings - Fork 3
REST Interface: Accent
MikeKlemarewski edited this page Jul 26, 2012
·
24 revisions
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: ???
- retrieve a tag
- command: GET /api/tag/:id
- response: {errorcode: 0, tag:{...}}
- adds a tag to a MediaFile
- command: POST /api/tag
- request:
{
start: 50,
end: 140,
type: 1,
target: "uuid of target media file",
title: "optional title",
description: "optional description",
question: "uuid of question",
important: true/false,
interest: true/false,
examable: true/false,
reviewlater: true/false,
shared: true/false
}
- response: {errorcode: 0, tag:{...}}
- update a tag based on the id
- command: PUT /api/tag/:id
- response: {errorcode: 0, tag:{...}}
- remove a Tag
- command: DELETE /api/tag/:id
- response: {errorcode: 0, tag:{...}}
- Get the last watched tag of the user who is logged in
- command: GET /api/tag/last-watched
- response: {errorcode: 0, tag:{...}}
- Set the last watched tag of the user who is logged in
- command: PUT /api/tag/last-watched
- request:
{
start: 50,
end: 140,
type: 1,
target: "1A2B-3C4D-5E6F-7G8H",
}
- response: {errorcode: 0, tag:{...}}
- Get all the tags of the media file that belong to the user who is logged in
- command: GET /api/tag/mediafile/:id
- response: {errorcode: 0, tags:[{...},{...}]}
- retrieve a media file
- command: GET /api/mediafile/:id
- response: {errorcode: 0, 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 a media file based on the id
- command: PUT /api/mediafile/:id
- response: {errorcode: 0, mediafile:{...}}
- remove a media file
- command: DELETE /api/mediafile/:id
- response: {errorcode: 0, mediafile:{...}}
- retrieve all the tags from the media file
- command: GET /api/mediafile/:tid/tags
- response: JSON data of the tags
- retrieve all the tags from the media file
- command: GET /api/questions/mediafile/:tid
- response: {errorcode: 0, questions:[{...},{...}]}
- gets all the media files for a certain course
- command: GET /api/mediafiles/course/:id
- response: {errorcode: 0, media:[{...},{...}]}
##Conversations
- Returns a list of conversations for a specific media file, as well as all conversations that the user has participated in
- command: GET /api/mediafile/:id/conversations
- reponse: {errorcode: 0, mediaQuestions:[{...},{...}], userQuestions:[{...},{...}]}