Register admin: POST -
https://cde-v1.herokuapp.com/v1/register
Login admin: POST -
https://cde-v1.herokuapp.com/v1/login
{
name: 'your name',
email: 'your@email.com',
password: 'pick a good one'
}
create: POST - https://cde-v1.herokuapp.com/v1/campaign/particepent/create
{
name: 'your name',
email: 'your@email.com',
}
Create with existing participant: POST -
https://cde-v1.herokuapp.com/v1/campaign/recipes/create/[participant_id]
Create without existing participant: POST -
https://cde-v1.herokuapp.com/v1/campaign/recipes/create
Read all recipe: GET -
https://cde-v1.herokuapp.com/v1/campaign/recipes
Read recipe by id: GET edit -
https://cde-v1.herokuapp.com/v1/campaign/recipes/[recipe_id]
Like recipe: PUT -
https://cde-v1.herokuapp.com/v1/campaign/recipes/like/[recipe_id]
Remove like from recipe: PUT removed -
https://cde-v1.herokuapp.com/v1/campaign/recipes/[participant_id]/dislike/[recipe_id]
Remove recipe (Admin only): DELETE -
https://cde-v1.herokuapp.com/v1/campaign/recipes/[recipe_id]/delete
{
name: 'recipe name',
body: 'Maybe you have a fun story about it...',
particepent: participant_id,
upvotes: 0,
ingredients: ["array", "of", "ingredients"]
}
Create ingredient: POST -
https://cde-v1.herokuapp.com/v1/campaign/ingredients/create
Read all ingredients: GET -
https://cde-v1.herokuapp.com/v1/campaign/ingredients
Update ingredient: PUT -
https://cde-v1.herokuapp.com/v1/campaign/ingredients/update/[ingredient_id]
Delete ingredient: DELETE -
https://cde-v1.herokuapp.com/v1/campaign/ingredients/delete/[ingredient_id]
{
name: 'ingredient name',
category: category_id,
messurement: {
unit: 'ml, g, etc',
amount: [array, of, amounts]
}
}
Create category: POST -
https://cde-v1.herokuapp.com/v1/campaign/categories/create
Read all categories: GET -
https://cde-v1.herokuapp.com/v1/campaign/categories
Read single category: GET -
https://cde-v1.herokuapp.com/v1/campaign/categories/[category_id]
Update category: PUT -
https://cde-v1.herokuapp.com/v1/campaign/categories/[category_id]
{
name: 'category name',
items: [array, of, ingredient, ids]
}
Create a page: POST -
https://cde-v1.herokuapp.com/v1/content/newpage
Create section for page: POST -
https://cde-v1.herokuapp.com/v1/content/[page_id]/newsection
Read page: GET -
https://cde-v1.herokuapp.com/v1/content/[page_id]
Read page sections: GET -
https://cde-v1.herokuapp.com/v1/content/[page_id]/sections
Read single section: GET -
https://cde-v1.herokuapp.com/v1/content/single/[section_id]
Update section: PUT -
https://cde-v1.herokuapp.com/v1/content/update/[section_id]
Read all pages: GET -
https://cde-v1.herokuapp.com/v1/content/pages
{
pageTitle: 'your page title',
contents: [array, of, section, ids],
created_by: admin_id
}
{
title: 'your title',
contents: your content as an Object,
belongs_to: page_id
}