GroceriStar / types

GNU General Public License v3.0
0 stars 4 forks source link

[Groceristar][api][methods] #3

Closed atherdon closed 5 years ago

atherdon commented 6 years ago

Below you'll see a document with basic URLS, that have any groceristar project. In order to make it better, we'll create set of constants, each for a new path. Example: POST [/grocerylist/department] will became export const GROCERY_DEPARMENT_POST = "/grocerylist/department";

Put your code in this file: https://github.com/GroceriStar/types/blob/master/Groceristar/api/methods.js


// POST [/grocerylist/department] Departmentalize a list of strings — used for ad-hoc grocery list item addition

// DELETE [/grocerylist] Delete all the items on a grocery list; faster operation than a sync with deleted items.

// GET [/grocerylist] Get the user’s grocery list. User is determined by Basic Authentication.

// POST [/grocerylist/recipe] Add a Recipe to the grocery list. In the request data, pass in recipeId, scale (scale=1.0 says to keep the recipe the same size as originally posted), markAsPending (true/false) to indicate that the lines in the recipe should be marked in a “pending” (unconfirmed by user) state.

// POST [/grocerylist/sync] Synchronize the grocery list. Call this with a POST to /grocerylist/sync

// POST [/grocerylist/item] Add a single line item to the grocery list

// DELETE [/grocerylist/item/{guid}] [/grocerylist/item/{guid}] DELETE will delete this item assuming you own it.

// PUT [/grocerylist/item/{guid}] Update a grocery item by GUID