ImdbService v1 - Zexuz/TvCalander-Node-Api GitHub Wiki
##All metods is using this URL format
http://\<host>/\api/ImbdService/\v1/\<MethodPath>
Used to get all Series id and titles in the database.
###Info
Method: GET
Method Path: /Series
Optional Param: NONE
Required Param: NONE
Example return data:
[
{
"title": "the x-files",
"id": "0106179"
},
{
"title": "american crime story",
"id": "2788432"
},
{
"title": "game of thrones",
"id": "0944947"
},
{
"title": "the walking dead",
"id": "1520211"
}
]
Used to add a series to the database.
###Info
Method: POST
Method Path: /Series
Optional Param: year,imgLink,seasons
Required Param: title,id
Example request:
/Series
{
"title": "game of thrones",
"id": "0944947",
"year":"2011",
"imgLink":"someurl",
"seasons":[
{
"seasons":1,
"episodes":[
{
"episode":1,
"airDate":"2011-04-13"
}
]
}
]
}
Example return data: This is the same as the sent data.
{
"title": "game of thrones",
"id": "0944947",
"year":"2011",
"imgLink":"someurl",
"seasons":[
{
"seasons":1,
"episodes":[
{
"episode":1,
"airDate":"2011-04-13"
}
]
}
]
}
Errors:
400: The data sent is invalid
409: The id is not unique, eg we already have it in the database
Used to get all data about that series.
###Info
Method: GET
Method Path: /Series/id
Optional Param: NONE
Required Param: NONE
Id is the IMDB id of that series, eg 0944947 for Game of thrones
Example return data:
{
"title": "game of thrones",
"id": "0944947",
"year":"2011",
"imgLink":"someurl",
"seasons":[
{
"seasons":1,
"episodes":[
{
"episode":1,
"airDate":"2011-04-13"
}
]
}
]
}
Used to update or add a series.
Will update or create a series with the specified id, title and other properties.
###Info
Method: PUT
Method Path: /Series/id
Optional Param: year,imgLink,seasons
Required Param: title,id
Id is the IMDB id of that series, eg 0944947 for Game of thrones
Example request:
/Series/id
{
"title": "game of thrones",
"id": "0944947",
"year":"2011",
"imgLink":"someurl",
"seasons":[
{
"seasons":1,
"episodes":[
{
"episode":1,
"airDate":"2011-04-13"
}
]
}
]
}
Example return data: This is the same as the sent data.
{
"title": "game of thrones",
"id": "0944947",
"year":"2011",
"imgLink":"someurl",
"seasons":[
{
"seasons":1,
"episodes":[
{
"episode":1,
"airDate":"2011-04-13"
}
]
}
]
}
Errors:
400: The data sent is invalid