A RESTful API server providing data access to both Frontend ajax operations and at some point, third-party operations. Uses mynews-common
In most cases, CRUD operations map to their http 1.1 method counterparts. That means that in true RESTful style, Create = POST, Retrieve = GET, Update = PUT, & Delete = DELETE. In the case of listings, we use a pluralized GET such as GET /users
.
All requests are expected to be of type application/json
, with the obvious exceptions of GET & DELETE methods.
All responses are in JSON.
Summarized:
grunt test
Full Report:
grunt test_report
Coming soon...
Most of the models found in mynews-common are represented with this API.
GET /users
POST /user
GET /user/:user_id
PUT /user/:user_id
DELETE /user/:user_id
GET /user/:user_id/profile
PUT /user/:user_id/profile
GET /articles
POST /article
GET /article/:article_id
PUT /article/:article_id
DELETE /article/:article_id
GET /journalists
POST /journalist
GET /journalist/:journalist_id
PUT /journalist/:journalist_id
DELETE /journalist/:journalist_id
GET /publishers
POST /publisher
GET /publisher/:pub_id
PUT /publisher/:pub_id
DELETE /publisher/:pub_id