The BalanceBowl project contract assigned to NESA by Makers
#APIS Recepies
Where full URLs are provided in responses they will be rendered as if service is running on 'http://testserver/'.
Closed endpoints requre authorization header
- getRecepiesShort :
GET /api/recepy/short
- getRecepy :
GET /api/recepy/
- likeRecepy :
GET /api/recepy/like/
- bookRecepy :
GET /api/recepy/book/
Get a list of 10 recepies per request, it performs a skip function based on the page number,
URL : /api/recepy/
Method : GET
Auth required : YES
Data constraints
{
page:[page number]
}
Data example
{
page:2
}
Code : 200 OK
Content example
[
{
imgResource:[image Link],
recepyNmae:[name of recepy],
recepyID:[ID of recepy]
}
]
Code : 400 BAD REQUEST
Content :
{
msg:error message
}
Get
URL : /api/recepy/
Method : GET
Auth required : YES
Data constraints
{
recepyID:[recepy ID]
}
Data example
{
recepyID: 2
}
Code : 200 OK
Content example
{
recepyID:[recepy ID],
mageImageResource:[imageResource],
listOfImages:[imageResource,
imageResource,
imageResource,
imageResource,
imageResource
],
ingredients:[
ingredient,
ingredient,
ingredient,
ingredient,
ingredient
],
additionalInfo:[
addInfo,
addInfo,
addInfo,
addInfo,
addInfo
]
}
Code : 400 BAD REQUEST
Content :
{
"msg": "error message"
}
Like a recepy
URL : /api/recepy/like
Method : Poat
Auth required : YES
Data constraints
{
recepyID:[recepy ID]
}
Data example
{
recepyID:2
}
Code : 200 OK
Content example
{
msg:'true
}
Code : 400 BAD REQUEST
Content :
{
"msg": "error message"
}
Bookmark a recepy
URL : /api/recepy/book
Method : Poat
Auth required : YES
Data constraints
{
recepyID:[recepy ID]
}
Data example
{
recepyID:2
}
Code : 200 OK
Content example
{
msg:'true
}
Code : 400 BAD REQUEST
Content :
{
"msg": "error message"
}
Returns a video resource link and a list of segments showing the the percentage of the video and the text said in that percentage checkout ui for clarification!!!
URL : /api/recepy/howtoccok
Method : GET
Auth required : YES
Data constraints
{
recepyID:[recepy ID]
}
Data example
{
recepyID:2
}
Code : 200 OK
Content example
{
videsSrc:'video src',
steps:[
{
position:"[percentage of the video]",
text:"[text description of that part]"
},
{
position:"[percentage of the video]",
text:"[text description of that part]"
},
{
position:"[percentage of the video]",
text:"[text description of that part]"
}
]
}
Code : 400 BAD REQUEST
Content :
{
"msg": "error message"
}