-
Notifications
You must be signed in to change notification settings - Fork 3
REST end points
This section contains an overview of the the available REST end-points.
If you platform already have a SDK we recommend you use that instead of integrating directly towards the rest interface.
The Pocket-Reivews API is a fully RESTful API. This means it adheres as closely to REST guidelines as possible.
The API returns data as json by default, but you can also choose to return data in pson and for some methods klm format. Simply specify the format as the file extension in the url.
json - someserver.com/api/movie/1209/like
jsonp - someserver.com/api/movie/1209/like.jsonp
klm someserver.com/api/movie/nearby.klm
The API has multiple versions that are used to prevent changes to the API from breaking your apps. Development of new features will always be on the most current version of the API, while development on previous versions of the API will be limited to severe bug fixes only.
To specify which version of the API you wish to access, you must indicate that version after the /api and before the domain.
v1 someserver.com/api/movie/1209/like
v2 someserver.com/api/v2/movie/1209/like
v3 someserver.com/api/v3/movie/1209/like
Methods are used to tell Pocket-Reviews what you want to do with a specific object. You can create, delete and update most objects via the REST API.
- PUT - allows you to create a new object, such as a Like, Comment or Rating
- POST - update an existing object
- DELETE - delete an existing object
- GET - get an existing object
In order to use the API, your application needs to use Basic Authentication.
When you register you app through the backend you need to select an unique domain and the backend generates an appId and appKey in return.
The appId and appKey forms the user and password respectively in the Basic Authentication algorithm and is put in the Authorization header in the http request. More information about Basic Authentication can be found here Wikipedia.
The following end-points are available.
For a detailed description of the request and returned json please check the details REST documentation TBD
|| asd | asdasd | asdsd ||
api/{version}/{domain}/rating PUT Rate a product
api/{version}/{domain}/rating/{id} GET Get rating details
api/{version}/{domain}/rating/{id} DELETE Delete a rating
api/{version}/{domain}/rating?username= GET Get ratings for a user
api/{version}/{domain}/rating?productId= GET Get all ratings for product
There should never be any need to integrated towards these end-points. Security for these end-points are implemented using GAE Users service.