-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the cocktail db api #26
Conversation
const updatedCookbook: Cookbook = { | ||
userId: this.cookbook.userId, | ||
recipes: Array.from(this.mappedRecipes.values()).map(recipe => recipe.recipeId) | ||
// tslint:disable-next-line:max-line-length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
import {HttpClient} from '@angular/common/http'; | ||
import {Cookbook} from './cookbook'; | ||
import {LoginService} from '../../../../auth/src/app/login/login.service'; | ||
import {Observable} from 'rxjs'; | ||
|
||
const COOKBOOK_API = '/api/cookbook/'; | ||
|
||
class InternalRecipe { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
@@ -1,6 +1,14 @@ | |||
import {RecipeType} from '../../../../recipe/src/app/recipe/recipe'; | |||
|
|||
export interface Cookbook { | |||
// the user this cookbook belongs to. | |||
userId: string; | |||
// this is nothing more than a list of recipe ids. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
@@ -13,7 +13,7 @@ | |||
(mouseout)="activated[i]=false" | |||
(click)="selectRecipe(result)" | |||
*ngFor="let result of searchResults; let i = index;"> | |||
{{result}} | |||
{{result[0]}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double check this.
Adding https://www.thecocktaildb.com/
TODO: Need to document and accredit this API - sibling of the MealDB.