-
Notifications
You must be signed in to change notification settings - Fork 3
REST Interface: Common
MikeKlemarewski edited this page Jul 26, 2012
·
19 revisions
Presenter Types: Question, Comment
- gets full details about a user
- command: GET /api/user/:uid
- response: { errorcode: 0, user: { ... } }
- gets full details about a user
- command: GET /api/user/courses
- response: { errorcode: 0, courses: { ... } }
- gets a list of users filtered by a custom query
- command: POST /api/users/
- request: { where: { ... } }
- response: { errorcode: 0, users: [{ ... }, { ... }] }
- updates the preferred name of the user who is logged in
- command: PUT /api/user/setPreferedName
- response: { errorcode: 0, user: { ... } }
- updates the preferred name of the user provided
- command: GET /api/user/:id/profile
- response: { errorcode: 0, profile: { ... } }
- updates the preferred name of the user provided
- command: PUT /api/user/:id/profile
- request:
{
profilePicture: , "/path/to/pic",
bio:"I like turtles",
lastWatchedTag:"1A2B-3C4D-5E6F-7G8H"
}
- response: { errorcode: 0, profile: { ... } }
- gets full details about a course
- command: GET /api/course/:uid
- response: { errorcode: 0, course: { ... } }
- gets a list of courses filtered by a custom query
- command: POST /api/courses/
- request: { where: { ... } }
- response: { errorcode: 0, courses: [{ ... }, { ... }] }
- gets the instructor of the requested course
- command: GET /api/course/:id/instructor
- response: { errorcode: 0, instructor: { ... } }
- gets all members of a certain course
- command: GET /api/course/:id/members
- response: { errorcode: 0, members: { ... } }