-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
62 lines (62 loc) · 2.15 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
export var chefkochAPI: ChefkochAPI;
export class DataParser {
writeFile(fileName: String, data: any): Promise<void>;
readFile(fileName: String): Promise<any>;
writeRecipesToJson(recipes: Recipe[], fileName: String): Promise<void>;
writeCategoriesToJson(categories: Category[], fileName: String): Promise<void>;
writeRecipesToCSV(recipes: Recipe[], fileName: String): Promise<void>;
writeCategoriesToCSV(categories: Category[], fileName: String): Promise<void>;
loadRecipesFromJson(fileName: String): Promise<any>;
loadCategoriesFromJson(fileName: String): Promise<any>;
loadRecipesFromCSV(fileName: String): Promise<Recipe[]>;
loadCategoriesFromCSV(fileName: String): Promise<Category[]>;
}
export class Tag {
constructor(name: String, url: String);
name: String;
url: String;
getName(): String;
getUrl(): String;
toString(): String;
}
export class Recipe {
constructor(name: String, url: String, ingredients: Ingredient[], category: Category, tags?: Tag[]);
name: String;
url: String;
ingredients: Ingredient[];
category: Category;
tags: Tag[];
getName(): String;
getUrl(): String;
getIngredients(): Ingredient[];
getCategory(): Category;
getTags(): Tag[];
toString(): String;
}
export class Category {
constructor(name: String, url: String);
name: String;
url: String;
getName(): String;
getUrl(): String;
toString(): String;
}
export class Ingredient {
constructor(name: String, amount: String);
name: String;
amount: String;
getName(): String;
getAmount(): String;
toString(): String;
}
export class ChefkochAPI {
baseURL: String;
getCategories(): Promise<Category[]>;
getRecipes(category: Category, endIndex?: number, startIndex?: number): Promise<Recipe[]>;
beautifyText(text: String): String;
getAllRecipes(endIndex?: number, startIndex?: number): Promise<Recipe[]>;
searchRecipes(query: String, endIndex?: number, startIndex?: number): Promise<Recipe[]>;
getRecipe(recipeSubURL: String): Promise<Recipe>;
getCategory(categorySubURL: String): Promise<Category>;
}
//# sourceMappingURL=index.d.ts.map