Skip to content
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

Merged
merged 2 commits into from
Jul 22, 2019
Merged

Add the cocktail db api #26

merged 2 commits into from
Jul 22, 2019

Conversation

Bwvolleyball
Copy link
Owner

Adding https://www.thecocktaildb.com/

TODO: Need to document and accredit this API - sibling of the MealDB.

@Bwvolleyball Bwvolleyball self-assigned this Jul 22, 2019
const updatedCookbook: Cookbook = {
userId: this.cookbook.userId,
recipes: Array.from(this.mappedRecipes.values()).map(recipe => recipe.recipeId)
// tslint:disable-next-line:max-line-length
Copy link
Owner Author

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 {
Copy link
Owner Author

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.
Copy link
Owner Author

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]}}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

double check this.

@Bwvolleyball Bwvolleyball merged commit 7054654 into master Jul 22, 2019
@delete-merged-branch delete-merged-branch bot deleted the add-the-cocktail-db-api branch July 22, 2019 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant