Create a community of like minded Authorss to foster inspiration and innovation by leveraging the modern web.
The preferred JSON object to be returned by the API should be structured as follows:
{
"Users": {
"email": "jake@jake.jake",
"token": "jwt.token.here",
"Usersname": "jake",
"bio": "I work at statefarm",
"image": null
}
}
{
"profile": {
"Usersname": "jake",
"bio": "I work at statefarm",
"image": "image-link",
"following": false
}
}
{
"Articles": {
"slug": "how-to-train-your-dragon",
"title": "How to train your dragon",
"description": "Ever wonder how?",
"body": "It takes a Jacobian",
"tagList": ["dragons", "training"],
"createdAt": "2016-02-18T03:22:56.637Z",
"updatedAt": "2016-02-18T03:48:35.824Z",
"favorited": false,
"favoritesCount": 0,
"Authors": {
"Usersname": "jake",
"bio": "I work at statefarm",
"image": "https://i.stack.imgur.com/xHWG8.jpg",
"following": false
}
}
}
{
"Articless":[{
"slug": "how-to-train-your-dragon",
"title": "How to train your dragon",
"description": "Ever wonder how?",
"body": "It takes a Jacobian",
"tagList": ["dragons", "training"],
"createdAt": "2016-02-18T03:22:56.637Z",
"updatedAt": "2016-02-18T03:48:35.824Z",
"favorited": false,
"favoritesCount": 0,
"Authors": {
"Usersname": "jake",
"bio": "I work at statefarm",
"image": "https://i.stack.imgur.com/xHWG8.jpg",
"following": false
}
}, {
"slug": "how-to-train-your-dragon-2",
"title": "How to train your dragon 2",
"description": "So toothless",
"body": "It a dragon",
"tagList": ["dragons", "training"],
"createdAt": "2016-02-18T03:22:56.637Z",
"updatedAt": "2016-02-18T03:48:35.824Z",
"favorited": false,
"favoritesCount": 0,
"Authors": {
"Usersname": "jake",
"bio": "I work at statefarm",
"image": "https://i.stack.imgur.com/xHWG8.jpg",
"following": false
}
}],
"ArticlessCount": 2
}
{
"comment": {
"id": 1,
"createdAt": "2016-02-18T03:22:56.637Z",
"updatedAt": "2016-02-18T03:22:56.637Z",
"body": "It takes a Jacobian",
"Authors": {
"Usersname": "jake",
"bio": "I work at statefarm",
"image": "https://i.stack.imgur.com/xHWG8.jpg",
"following": false
}
}
}
{
"comments": [{
"id": 1,
"createdAt": "2016-02-18T03:22:56.637Z",
"updatedAt": "2016-02-18T03:22:56.637Z",
"body": "It takes a Jacobian",
"Authors": {
"Usersname": "jake",
"bio": "I work at statefarm",
"image": "https://i.stack.imgur.com/xHWG8.jpg",
"following": false
}
}],
"commentsCount": 1
}
{
"tags": [
"reactjs",
"angularjs"
]
}
If a request fails any validations, expect errors in the following format:
{
"errors":{
"body": [
"can't be empty"
]
}
}
401 for UnAuthorsized requests, when a request requires authentication but it isn't provided
403 for Forbidden requests, when a request may be valid but the Users doesn't have permissions to perform the action
404 for Not found requests, when a resource can't be found to fulfill the request
POST /api/Userss/login
Example request body:
{
"Users":{
"email": "jake@jake.jake",
"password": "jakejake"
}
}
No authentication required, returns a Users
Required fields: email, password
POST /api/Userss
Example request body:
{
"Users":{
"Usersname": "Jacob",
"email": "jake@jake.jake",
"password": "jakejake"
}
}
No authentication required, returns a Users
Required fields: email, Usersname, password
GET /api/Users
Authentication required, returns a Users that's the current Users
PUT /api/Users
Example request body:
{
"Users":{
"email": "jake@jake.jake",
"bio": "I like to skateboard",
"image": "https://i.stack.imgur.com/xHWG8.jpg"
}
}
Authentication required, returns the Users
Accepted fields: email, Usersname, password, image, bio
GET /api/profiles/:Usersname
Authentication optional, returns a Profile
POST /api/profiles/:Usersname/follow
Authentication required, returns a Profile
No additional parameters required
DELETE /api/profiles/:Usersname/follow
Authentication required, returns a Profile
No additional parameters required
GET /api/Articless
Returns most recent Articless globally by default, provide tag, Authors or favorited query parameter to filter results
Query Parameters:
Filter by tag:
?tag=AngularJS
Filter by Authors:
?Authors=jake
Favorited by Users:
?favorited=jake
Limit number of Articless (default is 20):
?limit=20
Offset/skip number of Articless (default is 0):
?offset=0
Authentication optional, will return multiple Articless, ordered by most recent first
GET /api/Articless/feed
Can also take limit and offset query parameters like List Articless
Authentication required, will return multiple Articless created by followed Userss, ordered by most recent first.
GET /api/Articless/:slug
No authentication required, will return single Articles
POST /api/Articless
Example request body:
{
"Articles": {
"title": "How to train your dragon",
"description": "Ever wonder how?",
"body": "You have to believe",
"tagList": ["reactjs", "angularjs", "dragons"]
}
}
Authentication required, will return an Articles
Required fields: title, description, body
Optional fields: tagList as an array of Strings
PUT /api/Articless/:slug
Example request body:
{
"Articles": {
"title": "Did you train your dragon?"
}
}
Authentication required, returns the updated Articles
Optional fields: title, description, body
The slug also gets updated when the title is changed
DELETE /api/Articless/:slug
Authentication required
POST /api/Articless/:slug/comments
Example request body:
{
"comment": {
"body": "His name was my name too."
}
}
Authentication required, returns the created Comment
Required field: body
GET /api/Articless/:slug/comments
Authentication optional, returns multiple comments
DELETE /api/Articless/:slug/comments/:id
Authentication required
POST /api/Articless/:slug/favorite
Authentication required, returns the Articles No additional parameters required
DELETE /api/Articless/:slug/favorite
Authentication required, returns the Articles
No additional parameters required
GET /api/tags