skip to main content

API v1 Documentation
API v2 Documentation

API Use Cases

Retrieve a user's inventory and display all recipes.

  1. Use users/sign_in to get an auth token to use for future api calls.
  2. Use bars/inventory to get the user's inventory bar id.
  3. Use bars/recipes to get the ids of the recipes in the user's active bar.
  4. Use recipes/show to show each individual recipe in the user's active bar.








users/sign_in

Sign a user in and get an auth token to user for subsequent requests.

example




example return data (JSON)

Successful login:

{
  "success": true,
  "auth_token": "i4aaon2MwVRdTsSpxqmq",
  "email": "[email protected]"
}

Incorrect email or password:

{
  "success": false,
  "errors": "Invalid email or password."
}









/api/v1/bars/custom_bars.json

Show all of the bars that belong to a user.

example



example output appears here...


/api/v1/bars/ingredients.json

Show all of the ingredients that a bar has.

example



example output appears here...


/api/v1/bars/inventory.json

Show which bar is the current user's inventory bar.

example



example output appears here...


/api/v1/bars/recipes.json

Show all of the recipes that a bar can make.

example



example output appears here...


/api/v1/ingredients/show.json

Show the details of an ingredient (the ingredient's name).

example



example output appears here...


/api/v1/ingredients/updated_since.json

Show which ingredients have been updated since a previous date (including ingredients updated on that date).

example



example output appears here...


/api/v1/recipes/show.json

Show a recipe (ingredients, instructions, images, etc.).

example



example output appears here...


/api/v1/recipes/updated_since.json

Show which recipes have been updated since a previous date (including recipes updated on that date).

example



example output appears here...


/api/v1/users/show_current.json

Show details about the current user (the user's username).

example



example output appears here...