-
Notifications
You must be signed in to change notification settings - Fork 4
Server
kormang edited this page Jul 15, 2015
·
33 revisions
#Database
- Initial database created for demo purposes on 14th of July. Changes will be made.
- Currently, in our initial database we have video collection, which contains the following documents : _id, title, description, duration, author and path.
#Services
##Getting list of videos
-
GET: /videosThis returns all videos -
GET: /videos?skip=number of videos to skip&limit=number of videos to returnHere skip and limit parameters are positive integer or zero in which case it's same as without parameters.
Example of response:
[
{
"_id":"55a50e8f8a9463a1b4f84f88",
"title":"Video about learning",
"description":"Learn all about your future",
"duration":12345,"author":"John Doe",
"path":"https://www.youtube.com/watch?v=QfOZWGLT1JM"
},
{
"_id":"55a50f288a9463a1b4f84f89",
"title":"Angular JS all about",
"description":"Easiest tutorial ever",
"duration":1230123,"author":"Jane Doe",
"path":"https://www.youtube.com/watch?v=xe1LrMqURuw"
}
]
Empty array (arr.length == 0) means that there are no (more) results.