complex book filters
This commit is contained in:
parent
5e36bd0c27
commit
d0549bcb6d
@ -44,7 +44,12 @@ class RecipeSearch():
|
||||
'or_not': self._params.get('foods_or_not', None),
|
||||
'and_not': self._params.get('foods_and_not', None)
|
||||
}
|
||||
self._books = self._params.get('books', None)
|
||||
self._books = {
|
||||
'or': self._params.get('books_or', None),
|
||||
'and': self._params.get('books_and', None),
|
||||
'or_not': self._params.get('books_or_not', None),
|
||||
'and_not': self._params.get('books_and_not', None)
|
||||
}
|
||||
self._steps = self._params.get('steps', None)
|
||||
self._units = self._params.get('units', None)
|
||||
# TODO add created by
|
||||
@ -99,7 +104,7 @@ class RecipeSearch():
|
||||
# self._last_cooked()
|
||||
self.keyword_filters(**self._keywords)
|
||||
self.food_filters(**self._foods)
|
||||
self.book_filters(books=self._books, operator=self._books_or)
|
||||
self.book_filters(**self._books)
|
||||
self.rating_filter(rating=self._rating)
|
||||
self.internal_filter()
|
||||
self.step_filters(steps=self._steps)
|
||||
@ -269,16 +274,30 @@ class RecipeSearch():
|
||||
def internal_filter(self):
|
||||
self._queryset = self._queryset.filter(internal=True)
|
||||
|
||||
def book_filters(self, books=None, operator=True):
|
||||
if not books:
|
||||
def book_filters(self, **kwargs):
|
||||
if all([kwargs[x] is None for x in kwargs]):
|
||||
return
|
||||
if not isinstance(books, list):
|
||||
books = [books]
|
||||
if operator == True:
|
||||
self._queryset = self._queryset.filter(recipebookentry__book__id__in=books)
|
||||
else:
|
||||
for k in books:
|
||||
self._queryset = self._queryset.filter(recipebookentry__book__id=k)
|
||||
for bk_filter in kwargs:
|
||||
if not kwargs[bk_filter]:
|
||||
continue
|
||||
if not isinstance(kwargs[bk_filter], list):
|
||||
kwargs[bk_filter] = [kwargs[bk_filter]]
|
||||
|
||||
if 'or' in bk_filter:
|
||||
f = Q(recipebookentry__book__id__in=kwargs[bk_filter])
|
||||
if 'not' in bk_filter:
|
||||
self._queryset = self._queryset.exclude(f)
|
||||
else:
|
||||
self._queryset = self._queryset.filter(f)
|
||||
elif 'and' in bk_filter:
|
||||
recipes = Recipe.objects.all()
|
||||
for book in kwargs[bk_filter]:
|
||||
if 'not' in bk_filter:
|
||||
recipes = recipes.filter(recipebookentry__book__id=book)
|
||||
else:
|
||||
self._queryset = self._queryset.filter(recipebookentry__book__id=book)
|
||||
if 'not' in bk_filter:
|
||||
self._queryset = self._queryset.exclude(id__in=recipes.values('id'))
|
||||
|
||||
def step_filters(self, steps=None, operator=True):
|
||||
if operator != True:
|
||||
|
@ -634,19 +634,22 @@ class RecipeViewSet(viewsets.ModelViewSet):
|
||||
query_params = [
|
||||
QueryParam(name='query', description=_('Query string matched (fuzzy) against recipe name. In the future also fulltext search.')),
|
||||
QueryParam(name='keywords', description=_('ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or'), qtype='int'),
|
||||
QueryParam(name='keywords_or', description=_('Keyword IDs, repeat for multiple Return recipes with any of the keywords'), qtype='int'),
|
||||
QueryParam(name='keywords_and', description=_('Keyword IDs, repeat for multiple Return recipes with all of the keywords.'), qtype='int'),
|
||||
QueryParam(name='keywords_or_not', description=_('Keyword IDs, repeat for multiple Exclude recipes with any of the keywords.'), qtype='int'),
|
||||
QueryParam(name='keywords_and_not', description=_('Keyword IDs, repeat for multiple Exclude recipes with all of the keywords.'), qtype='int'),
|
||||
QueryParam(name='keywords_or', description=_('Keyword IDs, repeat for multiple. Return recipes with any of the keywords'), qtype='int'),
|
||||
QueryParam(name='keywords_and', description=_('Keyword IDs, repeat for multiple. Return recipes with all of the keywords.'), qtype='int'),
|
||||
QueryParam(name='keywords_or_not', description=_('Keyword IDs, repeat for multiple. Exclude recipes with any of the keywords.'), qtype='int'),
|
||||
QueryParam(name='keywords_and_not', description=_('Keyword IDs, repeat for multiple. Exclude recipes with all of the keywords.'), qtype='int'),
|
||||
QueryParam(name='foods', description=_('ID of food a recipe should have. For multiple repeat parameter.'), qtype='int'),
|
||||
QueryParam(name='foods_or', description=_('Food IDs, repeat for multiple Return recipes with any of the foods'), qtype='int'),
|
||||
QueryParam(name='foods_and', description=_('Food IDs, repeat for multiple Return recipes with all of the foods.'), qtype='int'),
|
||||
QueryParam(name='foods_or_not', description=_('Food IDs, repeat for multiple Exclude recipes with any of the foods.'), qtype='int'),
|
||||
QueryParam(name='foods_and_not', description=_('Food IDs, repeat for multiple Exclude recipes with all of the foods.'), qtype='int'),
|
||||
QueryParam(name='foods_or', description=_('Food IDs, repeat for multiple. Return recipes with any of the foods'), qtype='int'),
|
||||
QueryParam(name='foods_and', description=_('Food IDs, repeat for multiple. Return recipes with all of the foods.'), qtype='int'),
|
||||
QueryParam(name='foods_or_not', description=_('Food IDs, repeat for multiple. Exclude recipes with any of the foods.'), qtype='int'),
|
||||
QueryParam(name='foods_and_not', description=_('Food IDs, repeat for multiple. Exclude recipes with all of the foods.'), qtype='int'),
|
||||
QueryParam(name='units', description=_('ID of unit a recipe should have.'), qtype='int'),
|
||||
QueryParam(name='rating', description=_('Rating a recipe should have. [0 - 5]'), qtype='int'),
|
||||
QueryParam(name='books', description=_('ID of book a recipe should be in. For multiple repeat parameter.')),
|
||||
QueryParam(name='books_or', description=_('If recipe should be in all (AND=''false'') or any (OR=''<b>true</b>'') of the provided books.')),
|
||||
QueryParam(name='books_or', description=_('Book IDs, repeat for multiple. Return recipes with any of the books'), qtype='int'),
|
||||
QueryParam(name='books_and', description=_('Book IDs, repeat for multiple. Return recipes with all of the books.'), qtype='int'),
|
||||
QueryParam(name='books_or_not', description=_('Book IDs, repeat for multiple. Exclude recipes with any of the books.'), qtype='int'),
|
||||
QueryParam(name='books_and_not', description=_('Book IDs, repeat for multiple. Exclude recipes with all of the books.'), qtype='int'),
|
||||
QueryParam(name='internal', description=_('If only internal recipes should be returned. [''true''/''<b>false</b>'']')),
|
||||
QueryParam(name='random', description=_('Returns the results in randomized order. [''true''/''<b>false</b>'']')),
|
||||
QueryParam(name='new', description=_('Returns new results first in search results. [''true''/''<b>false</b>'']')),
|
||||
|
@ -274,13 +274,29 @@
|
||||
</div>
|
||||
|
||||
<!-- books filter -->
|
||||
<h6 class="mt-2 mb-0" v-if="search.expert_mode && search.books_fields > 1">{{ $t("Books") }}</h6>
|
||||
<div class="row" v-if="ui.show_books">
|
||||
<div class="col-12">
|
||||
<b-input-group class="mt-2">
|
||||
<b-input-group class="mt-2" v-for="(x, i) in bookFields" :key="i">
|
||||
<template #prepend v-if="search.expert_mode">
|
||||
<b-input-group-text style="width: 3em" @click="search.books_fields = search.books_fields + 1">
|
||||
<i class="fas fa-plus-circle text-primary" v-if="x == search.books_fields && x < 4" />
|
||||
</b-input-group-text>
|
||||
<b-input-group-text
|
||||
style="width: 3em"
|
||||
@click="
|
||||
search.books_fields = search.books_fields - 1
|
||||
search.search_books[i].items = []
|
||||
refreshData(false)
|
||||
"
|
||||
>
|
||||
<i class="fas fa-minus-circle text-primary" v-if="x == search.books_fields && x > 1" />
|
||||
</b-input-group-text>
|
||||
</template>
|
||||
<generic-multiselect
|
||||
@change="genericSelectChanged"
|
||||
parent_variable="search_books"
|
||||
:initial_selection="search.search_books"
|
||||
:parent_variable="`search_books::${i}`"
|
||||
:initial_selection="search.search_books[i].items"
|
||||
:model="Models.RECIPE_BOOK"
|
||||
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
|
||||
v-bind:placeholder="$t('Books')"
|
||||
@ -288,12 +304,19 @@
|
||||
></generic-multiselect>
|
||||
<b-input-group-append>
|
||||
<b-input-group-text>
|
||||
<b-form-checkbox v-model="search.search_books_or" name="check-button" @change="refreshData(false)" class="shadow-none" style="width: 4em" switch>
|
||||
<span class="text-uppercase" v-if="search.search_books_or">{{ $t("or") }}</span>
|
||||
<b-form-checkbox v-model="search.search_books[i].operator" name="check-button" @change="refreshData(false)" class="shadow-none" style="width: 4em" switch>
|
||||
<span class="text-uppercase" v-if="search.search_books[i].operator">{{ $t("or") }}</span>
|
||||
<span class="text-uppercase" v-else>{{ $t("and") }}</span>
|
||||
</b-form-checkbox>
|
||||
</b-input-group-text>
|
||||
</b-input-group-append>
|
||||
<b-input-group-append v-if="search.expert_mode">
|
||||
<b-input-group-text>
|
||||
<b-form-checkbox v-model="search.search_books[i].not" name="check-button" @change="refreshData(false)" class="shadow-none">
|
||||
<span class="text-uppercase">{{ $t("not") }}</span>
|
||||
</b-form-checkbox>
|
||||
</b-input-group-text>
|
||||
</b-input-group-append>
|
||||
</b-input-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -407,7 +430,7 @@ import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher"
|
||||
Vue.use(VueCookies)
|
||||
Vue.use(BootstrapVue)
|
||||
|
||||
let SEARCH_COOKIE_NAME = "search_settings"
|
||||
let SEARCH_COOKIE_NAME = "search_settings1"
|
||||
let UI_COOKIE_NAME = "ui_search_settings"
|
||||
|
||||
export default {
|
||||
@ -438,11 +461,15 @@ export default {
|
||||
{ items: [], operator: true, not: false },
|
||||
{ items: [], operator: true, not: false },
|
||||
],
|
||||
search_books: [],
|
||||
search_books: [
|
||||
{ items: [], operator: true, not: false },
|
||||
{ items: [], operator: true, not: false },
|
||||
{ items: [], operator: true, not: false },
|
||||
{ items: [], operator: true, not: false },
|
||||
],
|
||||
search_units: [],
|
||||
search_rating: undefined,
|
||||
search_rating_gte: true,
|
||||
search_books_or: true,
|
||||
search_units_or: true,
|
||||
pagination_page: 1,
|
||||
expert_mode: false,
|
||||
@ -692,10 +719,17 @@ export default {
|
||||
this.search.search_foods = this.search.search_foods.map((x) => {
|
||||
return { ...x, items: [] }
|
||||
})
|
||||
this.search.search_books = []
|
||||
this.search.search_book = this.search.search_book.map((x) => {
|
||||
return { ...x, items: [] }
|
||||
})
|
||||
this.search.search_units = []
|
||||
this.search.search_rating = undefined
|
||||
this.search.pagination_page = 1
|
||||
this.search.keywords_fields = 1
|
||||
this.search.foods_fields = 1
|
||||
this.search.books_fields = 1
|
||||
this.search.rating_fields = 1
|
||||
this.search.units_fields = 1
|
||||
this.refreshData(false)
|
||||
},
|
||||
pageChange: function (page) {
|
||||
@ -764,12 +798,9 @@ export default {
|
||||
let params = {
|
||||
...this.addFields("keywords"),
|
||||
...this.addFields("foods"),
|
||||
...this.addFields("books"),
|
||||
query: this.search.search_input,
|
||||
rating: rating,
|
||||
books: this.search.search_books.map(function (A) {
|
||||
return A["id"]
|
||||
}),
|
||||
booksOr: this.search.search_books_or,
|
||||
internal: this.search.search_internal,
|
||||
random: this.random_search,
|
||||
_new: this.ui.sort_by_new,
|
||||
@ -784,10 +815,9 @@ export default {
|
||||
},
|
||||
searchFiltered: function (ignore_string = false) {
|
||||
let filtered =
|
||||
this.search?.search_keywords[0].items?.length === 0 &&
|
||||
this.search?.search_foods[0].items?.length === 0 &&
|
||||
this.search?.search_books?.length === 0 &&
|
||||
// this.settings?.pagination_page === 1 &&
|
||||
this.search?.search_keywords?.[0]?.items?.length === 0 &&
|
||||
this.search?.search_foods?.[0]?.items?.length === 0 &&
|
||||
this.search?.search_books?.[0]?.items?.length === 0 &&
|
||||
!this.random_search &&
|
||||
this.search?.search_rating === undefined
|
||||
|
||||
|
@ -448,7 +448,10 @@ export class Models {
|
||||
"units",
|
||||
"rating",
|
||||
"books",
|
||||
"booksOr",
|
||||
"books_or",
|
||||
"books_and",
|
||||
"books_or_not",
|
||||
"books_and_not",
|
||||
"internal",
|
||||
"random",
|
||||
"_new",
|
||||
|
@ -5283,19 +5283,22 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
*
|
||||
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
|
||||
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple Exclude recipes with all of the keywords.
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple. Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple. Exclude recipes with all of the keywords.
|
||||
* @param {number} [foods] ID of food a recipe should have. For multiple repeat parameter.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple Exclude recipes with all of the foods.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple. Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple. Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple. Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple. Exclude recipes with all of the foods.
|
||||
* @param {number} [units] ID of unit a recipe should have.
|
||||
* @param {number} [rating] Rating a recipe should have. [0 - 5]
|
||||
* @param {string} [books] ID of book a recipe should be in. For multiple repeat parameter.
|
||||
* @param {string} [booksOr] If recipe should be in all (AND=false) or any (OR=<b>true</b>) of the provided books.
|
||||
* @param {number} [booksOr] Book IDs, repeat for multiple. Return recipes with any of the books
|
||||
* @param {number} [booksAnd] Book IDs, repeat for multiple. Return recipes with all of the books.
|
||||
* @param {number} [booksOrNot] Book IDs, repeat for multiple. Exclude recipes with any of the books.
|
||||
* @param {number} [booksAndNot] Book IDs, repeat for multiple. Exclude recipes with all of the books.
|
||||
* @param {string} [internal] If only internal recipes should be returned. [true/<b>false</b>]
|
||||
* @param {string} [random] Returns the results in randomized order. [true/<b>false</b>]
|
||||
* @param {string} [_new] Returns new results first in search results. [true/<b>false</b>]
|
||||
@ -5304,7 +5307,7 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRecipes: async (query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: string, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options: any = {}): Promise<RequestArgs> => {
|
||||
listRecipes: async (query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options: any = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/recipe/`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
@ -5377,6 +5380,18 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
|
||||
localVarQueryParameter['books_or'] = booksOr;
|
||||
}
|
||||
|
||||
if (booksAnd !== undefined) {
|
||||
localVarQueryParameter['books_and'] = booksAnd;
|
||||
}
|
||||
|
||||
if (booksOrNot !== undefined) {
|
||||
localVarQueryParameter['books_or_not'] = booksOrNot;
|
||||
}
|
||||
|
||||
if (booksAndNot !== undefined) {
|
||||
localVarQueryParameter['books_and_not'] = booksAndNot;
|
||||
}
|
||||
|
||||
if (internal !== undefined) {
|
||||
localVarQueryParameter['internal'] = internal;
|
||||
}
|
||||
@ -9703,19 +9718,22 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
||||
*
|
||||
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
|
||||
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple Exclude recipes with all of the keywords.
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple. Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple. Exclude recipes with all of the keywords.
|
||||
* @param {number} [foods] ID of food a recipe should have. For multiple repeat parameter.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple Exclude recipes with all of the foods.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple. Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple. Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple. Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple. Exclude recipes with all of the foods.
|
||||
* @param {number} [units] ID of unit a recipe should have.
|
||||
* @param {number} [rating] Rating a recipe should have. [0 - 5]
|
||||
* @param {string} [books] ID of book a recipe should be in. For multiple repeat parameter.
|
||||
* @param {string} [booksOr] If recipe should be in all (AND=false) or any (OR=<b>true</b>) of the provided books.
|
||||
* @param {number} [booksOr] Book IDs, repeat for multiple. Return recipes with any of the books
|
||||
* @param {number} [booksAnd] Book IDs, repeat for multiple. Return recipes with all of the books.
|
||||
* @param {number} [booksOrNot] Book IDs, repeat for multiple. Exclude recipes with any of the books.
|
||||
* @param {number} [booksAndNot] Book IDs, repeat for multiple. Exclude recipes with all of the books.
|
||||
* @param {string} [internal] If only internal recipes should be returned. [true/<b>false</b>]
|
||||
* @param {string} [random] Returns the results in randomized order. [true/<b>false</b>]
|
||||
* @param {string} [_new] Returns new results first in search results. [true/<b>false</b>]
|
||||
@ -9724,8 +9742,8 @@ export const ApiApiFp = function(configuration?: Configuration) {
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: string, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse2004>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, internal, random, _new, page, pageSize, options);
|
||||
async listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse2004>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, page, pageSize, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
@ -11394,19 +11412,22 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
||||
*
|
||||
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
|
||||
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple Exclude recipes with all of the keywords.
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple. Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple. Exclude recipes with all of the keywords.
|
||||
* @param {number} [foods] ID of food a recipe should have. For multiple repeat parameter.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple Exclude recipes with all of the foods.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple. Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple. Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple. Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple. Exclude recipes with all of the foods.
|
||||
* @param {number} [units] ID of unit a recipe should have.
|
||||
* @param {number} [rating] Rating a recipe should have. [0 - 5]
|
||||
* @param {string} [books] ID of book a recipe should be in. For multiple repeat parameter.
|
||||
* @param {string} [booksOr] If recipe should be in all (AND=false) or any (OR=<b>true</b>) of the provided books.
|
||||
* @param {number} [booksOr] Book IDs, repeat for multiple. Return recipes with any of the books
|
||||
* @param {number} [booksAnd] Book IDs, repeat for multiple. Return recipes with all of the books.
|
||||
* @param {number} [booksOrNot] Book IDs, repeat for multiple. Exclude recipes with any of the books.
|
||||
* @param {number} [booksAndNot] Book IDs, repeat for multiple. Exclude recipes with all of the books.
|
||||
* @param {string} [internal] If only internal recipes should be returned. [true/<b>false</b>]
|
||||
* @param {string} [random] Returns the results in randomized order. [true/<b>false</b>]
|
||||
* @param {string} [_new] Returns new results first in search results. [true/<b>false</b>]
|
||||
@ -11415,8 +11436,8 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: string, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any): AxiosPromise<InlineResponse2004> {
|
||||
return localVarFp.listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, internal, random, _new, page, pageSize, options).then((request) => request(axios, basePath));
|
||||
listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any): AxiosPromise<InlineResponse2004> {
|
||||
return localVarFp.listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, page, pageSize, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -13109,19 +13130,22 @@ export class ApiApi extends BaseAPI {
|
||||
*
|
||||
* @param {string} [query] Query string matched (fuzzy) against recipe name. In the future also fulltext search.
|
||||
* @param {number} [keywords] ID of keyword a recipe should have. For multiple repeat parameter. Equivalent to keywords_or
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple Exclude recipes with all of the keywords.
|
||||
* @param {number} [keywordsOr] Keyword IDs, repeat for multiple. Return recipes with any of the keywords
|
||||
* @param {number} [keywordsAnd] Keyword IDs, repeat for multiple. Return recipes with all of the keywords.
|
||||
* @param {number} [keywordsOrNot] Keyword IDs, repeat for multiple. Exclude recipes with any of the keywords.
|
||||
* @param {number} [keywordsAndNot] Keyword IDs, repeat for multiple. Exclude recipes with all of the keywords.
|
||||
* @param {number} [foods] ID of food a recipe should have. For multiple repeat parameter.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple Exclude recipes with all of the foods.
|
||||
* @param {number} [foodsOr] Food IDs, repeat for multiple. Return recipes with any of the foods
|
||||
* @param {number} [foodsAnd] Food IDs, repeat for multiple. Return recipes with all of the foods.
|
||||
* @param {number} [foodsOrNot] Food IDs, repeat for multiple. Exclude recipes with any of the foods.
|
||||
* @param {number} [foodsAndNot] Food IDs, repeat for multiple. Exclude recipes with all of the foods.
|
||||
* @param {number} [units] ID of unit a recipe should have.
|
||||
* @param {number} [rating] Rating a recipe should have. [0 - 5]
|
||||
* @param {string} [books] ID of book a recipe should be in. For multiple repeat parameter.
|
||||
* @param {string} [booksOr] If recipe should be in all (AND=false) or any (OR=<b>true</b>) of the provided books.
|
||||
* @param {number} [booksOr] Book IDs, repeat for multiple. Return recipes with any of the books
|
||||
* @param {number} [booksAnd] Book IDs, repeat for multiple. Return recipes with all of the books.
|
||||
* @param {number} [booksOrNot] Book IDs, repeat for multiple. Exclude recipes with any of the books.
|
||||
* @param {number} [booksAndNot] Book IDs, repeat for multiple. Exclude recipes with all of the books.
|
||||
* @param {string} [internal] If only internal recipes should be returned. [true/<b>false</b>]
|
||||
* @param {string} [random] Returns the results in randomized order. [true/<b>false</b>]
|
||||
* @param {string} [_new] Returns new results first in search results. [true/<b>false</b>]
|
||||
@ -13131,8 +13155,8 @@ export class ApiApi extends BaseAPI {
|
||||
* @throws {RequiredError}
|
||||
* @memberof ApiApi
|
||||
*/
|
||||
public listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: string, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any) {
|
||||
return ApiApiFp(this.configuration).listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, internal, random, _new, page, pageSize, options).then((request) => request(this.axios, this.basePath));
|
||||
public listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, foodsOr?: number, foodsAnd?: number, foodsOrNot?: number, foodsAndNot?: number, units?: number, rating?: number, books?: string, booksOr?: number, booksAnd?: number, booksOrNot?: number, booksAndNot?: number, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any) {
|
||||
return ApiApiFp(this.configuration).listRecipes(query, keywords, keywordsOr, keywordsAnd, keywordsOrNot, keywordsAndNot, foods, foodsOr, foodsAnd, foodsOrNot, foodsAndNot, units, rating, books, booksOr, booksAnd, booksOrNot, booksAndNot, internal, random, _new, page, pageSize, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user