Skip to content

Instantly share code, notes, and snippets.

@el0911
Created October 9, 2019 16:44
Show Gist options
  • Save el0911/050b3afb799c6510895c92614deb2416 to your computer and use it in GitHub Desktop.
Save el0911/050b3afb799c6510895c92614deb2416 to your computer and use it in GitHub Desktop.

BALANCEBOWL API Documentation Templates

By Somto Achu

The BalanceBowl project contract assigned to NESA by Makers

#APIS Bwols

Where full URLs are provided in responses they will be rendered as if service is running on 'http://testserver/'.

Closed Endpoints

Closed endpoints requre authorization header

  • load : GET /api/bowls/load
  • founders: GET /api/bowls/founder
  • explorers: GET /api/bowls/explorers
  • todays: GET /api/bowls/todays/
  • popular: GET/api/bowls/popular

load

Get the details of a bowl by bowlID

URL : /api/bowls/load

Method : GET

Auth required : YES

Data constraints

{
    bowlID:[bowlID]
}

Data example

{
    bowlID:string
}

Success Response

Code : 200 OK

Content example

{
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgresource:string,
    prices:[
        int,
        int,
        int
    ]
}

Error Response

Code : 400 BAD REQUEST

Content :

     {
       "status": false,
       "error": "error message"
      }

Explorers

Get the list of bowls that are in the explorers table in the db(Note recomnedations create a explorers column to store ids of bowls )

URL : /api/bowls/explorers

Method : GET

Auth required : YES

Data constraints

None

Data example

None

Success Response

Code : 200 OK

Content example

[
   {
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string
    price:int
},
{
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string,
    price:int

},{
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string,
    price:int

}
]

Error Response

Code : 400 BAD REQUEST

Content :

     {
       "status": false,
       "error": "error message"
      }

Todays

Get the list of bowls that are in the todays table in the db(Note recomnedations create a todays column to store ids of bowls )

URL : /api/bowls/todays/

Method : GET

Auth required : YES

Data constraints

None

Data example

None

Success Response

Code : 200 OK

Content example

[
    {
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string
    price:int
},
{
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string,
    price:int

},{
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string,
    price:int

}
]

Error Response

Code : 400 BAD REQUEST

Content :

     {
       "status": false,
       "error": "error message"
      }

Popular

Get the list of bowls that are in the popular popular in the db(Note recomnedations create a founders column to store ids of bowls )

URL : GET/api/bowls/popular

Method : GET

Auth required : YES

Data constraints

None

Data example

None

Success Response

Code : 200 OK

Content example

[
    {
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string
    price:int
},
{
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string,
    price:int

},{
    bowlID:string,
    name:string,
    rating:float,
    likes:int,
    details:string,
    calories:int,
    imgminiresource:string,
    price:int

}
]

Error Response

Code : 400 BAD REQUEST

Content :

     {
       "status": false,
       "error": "error message"
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment