Skip to content

vyomrastogi/gmdb-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GMDB API

API Specifications

Resource Summary

URI HTTP Method HTTP Status Description
gmdb.com/api/movies GET 200 OK Returns the list of movie titles
gmdb.com/api/movies/{title} GET 200 OK Return the details for that movie
gmdb.com/api/movies/{title} GET 400 BAD REQUEST Returns error message when movie is not found
gmdb.com/api/movies/{title}/review POST 200 OK Returns updated reviews about the movie

GET /api/movies

Response Body:

{
	"data":{
		"movieTitles":[
		"Titanic",
		"Superman",
		 "Avatar",
		 "Avengers"
		]
	},
	"errorMessages":[
		"errors",
		"errors"
	]		
}

GET /api/movies/{title}

Response Body:

{
	"data":{
	"movieDetail":{
		"title" : "string",
		"director" : "string",
		"actors" : "string",
		"releaseYear" : "string",
		"description" : "string",
		"rating" : number		
		}
	},
	"errorMessages":[
		"Movie title not found",
		"errors"
	]	
}

POST /api/movies/{title}/review

Request Body :

{
	"rating":4,
	"review":"text"
}

Validation :

rating is required positive number between 0 - 5

Response Body:

{
	"data":{
	"movieDetail":{
		"title" : "string",
		"director" : "string",
		"actors" : "string",
		"releaseYear" : "string",
		"description" : "string",
		"rating" : 4,
		"reviews":[
					{"rating":4,"review":"text" },
					{"rating":4,"review":"text" },
					{"rating":4,"review":"text" }
			]		
		}
	},
	"errorMessages":[
		"errors",
		"errors"
	]	
}

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages