Skip to content
theHour edited this page Jul 16, 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 document fields : _id, title, description, duration, author and path.

#Services

##Getting list of videos

  • GET: /videos This returns all videos without the path/source
  • GET: /videos?skip=number of videos to skip&limit=number of videos to return Here skip and limit parameters are positive integer or zero in which case it's same as without parameters.
  • GET: /videos/:id Finds and returns one video from the database by _id
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.

Clone this wiki locally