Skip to content

App for setting up weekly menu's and shopping lists

Notifications You must be signed in to change notification settings

johncanthony/MealPlanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MealPlanner API V1

Endpoints

http://www.example.com/api/v1/dishes/

http://www.example.com/api/v1/dishes/dish/

http://www.example.com/api/v1/dishes/search

http://www.example.com/api/v1/dishes/date

/api/v1/dishes/

Description: Pulls a list of first 10 dishes

Method: GET

Parameters:

  • (Optional) cursor

    • Type: integer
    • Moves the cursor to pull a set of dishes starting from the cursor point
    • Example : /api/v1/dishes/?cursor=5
  • (Optional) count

    • Type: integer
    • Changes the total number of dishes pulled by the query. Note: depending on current cursor location, the returned list may be shorter than the count provided
    • Example : /api/v1/dishes/?count=25

Returns:

JSON

```
{
 status: string success
 cursor: integer cursor position
 dishes: [] array of dish names
}
```

/api/v1/dishes/dish

Method: GET

Description: Pulls the ingredients for a single dish

Parameters:

  • dish
    • Type: naked string with %20 in spaces
    • Specifies the dish being queried
    • Example: /api/v1/dishes/dish/?dish=Hot%20Dogs

Returns:

JSON 

```
{
 status: string - success/fail
 //status: success
 data: [] - array of ingredients
 key : string - name of the dish

//status: fail
error: string - error message     
}
```

Error: Response Code: 400

  • Dish parameter not provided

Method: POST

Description: Creates a new dish

Headers: 'Content-Type':'application/json'

Parameters:

JSON

 {
    dish : String,
    ingredients: Array,
 }
 ```

Returns:

JSON
{
 status: string - success/fail
 //status: success
 data: [] - array of ingredients
 key : string - name of the dish

 //status: fail
 error: string - error message     
}

### /api/v1/dishes/search

#### Method : GET

Description: Query all dishes given a partial string or keyword

Parameters:

* query 
* Type: naked string with %20 in spaces
* Partial string or keyword for dishes
* Example: /api/v1/dishes/search/?query=Hot%20Dogs

Returns:

 JSON 
 
 ```
 {
  status: string - success/fail
  //status: success
  data: [] - array of ingredients

 //status: fail
 error: string - error message     
 }
 ```

### /api/v1/dishes/date

#### Method: PUT


About

App for setting up weekly menu's and shopping lists

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published