Movies - lokenx/plex-requests GitHub Wiki
/movies
GET: Summary
Returns an array of all requested movies.
Parameters
None
Returned JSON
{
statusCode: 200,
data: [
{
"title": "Demo Movie",
"tmdb": 223344,
"imdb": "tt223344",
"released": "2010-11-27T02:34:39.000Z",
"user": "plexuser",
"downloaded": false,
"approved": true,
"poster_path": "/",
"created": "2016-01-07T01:06:03.860Z",
"_id": "V9hCBdxw0fTECjvx"
}
]
meta: {}
}
/movies/{id}
GET: Summary
Returns an individual movie object.
Parameters
The id
query should be an IMDB ID number
http://localhost:8000/api/v1/movies/tt12345
Returned JSON
{
statusCode: 200,
data: {
"title": "Demo Movie",
"tmdb": 223344,
"imdb": "tt12345",
"released": "2010-11-27T02:34:39.000Z",
"user": "plexuser",
"downloaded": false,
"approved": true,
"poster_path": "/",
"created": "2016-01-07T01:06:03.860Z",
"_id": "V9hCBdxw0fTECjvx"
}
meta: {}
}
/movies
POST: Summary
Add a new movie to Plex Requests. Will return the saved object on success.
Parameters
Movie object should be provided in the body, JSON encoded.
{
"release_date": "2008-07-18",
"title": "The Dark Knight",
"tmdb": 155,
"imdb": "tt0468569",
"user": "plexuser",
"downloaded": false,
"approved": true
"poster_path": "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg"
}
Returned JSON
{
"statusCode": 200,
"data": {
"poster_path": "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg",
"release_date": "2008-07-18",
"title": "The Dark Knight",
"tmdb": 155,
"imdb": "tt0468569",
"user": "plexuser",
"downloaded": false,
"approved": true
},
"meta": {}
}
/movies
DELETE: Summary
Removes a movie from Plex Requests. This requires authenticating with an admin user JWT.
Parameters
Movie IMDB ID should be provided in the body, JSON encoded.
{
"imdb": "tt12345",
"title": "Fake Movie Title"
}
Returned JSON
{
"statusCode": 200,
"data": {
"message": "Removed the movie Fake Movie Title"
},
"meta": {}
}
/movies
PUT: Summary
Updates a single movie object. All fields can be updated. This requires authenticating with an admin user JWT.
Parameters
Movie object should be provided in the body, JSON encoded.
{
"imdb": "tt0468569",
"update": {
"downloaded": true
}
}
Returned JSON
{
"statusCode": 200,
"data": {
"poster_path": "/1hRoyzDtpgMU7Dz4JF22RANzQO7.jpg",
"release_date": "2008-07-18",
"title": "The Dark Knight",
"tmdb": 155,
"imdb": "tt0468569",
"user": "plexuser",
"downloaded": true,
"approved": true
},
"meta": {}
}