API Documentation


API URL

http://spencerlarkin.com/Assignments/MovieDBRest/API/api.php

 


Methods

 

GET

Description

Returns movie entries based on params.

Params

Example jQuery code:

$.get("http://spencerlarkin.com/Assignments/MovieDBRest/API/api.php",{"id":5},gotList,"json");

$.get("http://spencerlarkin.com/Assignments/MovieDBRest/API/api.php",{"search":"best"},gotList,"json");

$.get("http://spencerlarkin.com/Assignments/MovieDBRest/API/api.php",{"count":"true"},gotList,"json");

 


POST

Description

Creates a movie entry based on params.

Params

Example jQuery code:

$.post("http://spencerlarkin.com/Assignments/MovieDBRest/API/api.php",{"title":"Super Spencer Movie","year":2016,"studio":"SpencerCo","price":19.95},gotList,"json");

 


PUT

Description

Edits or creates a movie entry based on params.

Params

Example jQuery code:

$.ajax({url: 'http://spencerlarkin.com/Assignments/MovieDBRest/API/api.php',type: 'PUT',data: {"title":"Super Spencer Test Film","year":2019,"studio":"PoopButt","price":20.25,"id":38},success: gotList});

 


DELETE

Description

Deletes movie based on params

Params

Example jQuery code:

$.ajax({url: 'API/api.php',type: 'DELETE',data: {"id"4:},success: gotList});

 


OPTIONS

Description

Returns options

 

 


Return

Returns Json Array, each object is a movie entry including: id, price, studio, title and year.