The BalanceBowl project contract assigned to NESA by Makers
#APIS Blog
Where full URLs are provided in responses they will be rendered as if service is running on 'http://testserver/'.
Closed endpoints requre authorization header
- blog :
GET /api/blog/
- load :
GET /api/blog/load
Get a random list of blog post from the DB
URL : /api/blog/
Method : GET
Auth required : YES
Data constraints
None
Data example
None
Code : 200 OK
Content example
[
{
name:string,
imageresourcemini:string,
time:fromated date string (look at ui)
rating:float,
blogID,string
},
{
name:string,
imageresourcemini:string,
time:fromated date string (look at ui)
rating:float,
blogID,string
},
{
name:string,
imageresourcemini:string,
time:fromated date string (look at ui)
rating:float,
blogID,string
},
{
name:string,
imageresourcemini:string,
time:fromated date string (look at ui)
rating:float,
blogID,string
}
]
Code : 400 BAD REQUEST
Content :
{
"status": false,
"error": "error message"
}
Load info about blog, infcluding blog titles image resouce and author details, note the blog content is kinda tricky on its own, its gonna b an array of objects in the format
{
text:string||imageresouce,
type:paraggraph||subtitle||img
}
The idea behind this is so the app can know what am gonna render its common sense
URL : /api/blog/load
Method : GET
Auth required : YES
Data constraints
{
blogID:[blog id ]
}
Data example
{
blogID:string
}
Code : 200 OK
Content example
[
{
title:string,
id:string,
content:[
{
text:string||imageresouce,
type:paraggraph||subtitle||img
},
{
text:string||imageresouce,
type:paraggraph||subtitle||img
},
{
text:string||imageresouce,
type:paraggraph||subtitle||img
}
],
aurthor:{
name:string,
title:string,
imageresource:string
}
}
]
Code : 400 BAD REQUEST
Content :
{
"status": false,
"error": "error message"
}