complex keyword filters

This commit is contained in:
Chris Scoggins
2022-01-20 13:34:02 -06:00
parent bb226a221e
commit 28d3d8a1e0
6 changed files with 274 additions and 107 deletions

View File

@ -141,9 +141,25 @@
</b-popover>
<!-- keywords filter -->
<h5 v-if="search.expert_mode && search.keywords_fields > 1">{{ $t("Keywords") }}</h5>
<div class="row" v-if="ui.show_keywords">
<div class="col-12">
<b-input-group class="mt-2" v-for="(x, i) in search.keyword_fields" :key="i">
<b-input-group class="mt-2" v-for="(x, i) in keywordFields" :key="i">
<template #prepend v-if="search.expert_mode">
<b-input-group-text style="width: 3em" @click="search.keywords_fields = search.keywords_fields + 1">
<i class="fas fa-plus-circle text-primary" v-if="x == search.keywords_fields && x < 4" />
</b-input-group-text>
<b-input-group-text
style="width: 3em"
@click="
search.keywords_fields = search.keywords_fields - 1
search.search_keywords[i].items = []
refreshData(false)
"
>
<i class="fas fa-minus-circle text-primary" v-if="x == search.keywords_fields && x > 1" />
</b-input-group-text>
</template>
<treeselect
v-if="ui.tree_select"
v-model="search.search_keywords[i].items"
@ -159,8 +175,8 @@
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
/>
<generic-multiselect
@change="genericSelectChanged"
v-if="!ui.tree_select"
@change="genericSelectChanged"
:parent_variable="`search_keywords::${i}`"
:initial_selection="search.search_keywords[i].items"
:model="Models.KEYWORD"
@ -170,12 +186,26 @@
></generic-multiselect>
<b-input-group-append>
<b-input-group-text>
<b-form-checkbox v-model="search.search_keywords[i].operator" name="check-button" @change="refreshData(false)" class="shadow-none" switch>
<span class="text-uppercase" v-if="search.search_keywords_or">{{ $t("or") }}</span>
<b-form-checkbox
v-model="search.search_keywords[i].operator"
name="check-button"
@change="refreshData(false)"
class="shadow-none"
switch
style="width: 4em"
>
<span class="text-uppercase" v-if="search.search_keywords[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_keywords[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>
@ -199,8 +229,8 @@
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
/>
<generic-multiselect
@change="genericSelectChanged"
v-if="!ui.tree_select"
@change="genericSelectChanged"
parent_variable="search_foods"
:initial_selection="search.search_foods"
:model="Models.FOOD"
@ -210,7 +240,7 @@
></generic-multiselect>
<b-input-group-append>
<b-input-group-text>
<b-form-checkbox v-model="search.search_foods_or" name="check-button" @change="refreshData(false)" class="shadow-none" switch>
<b-form-checkbox v-model="search.search_foods_or" name="check-button" @change="refreshData(false)" class="shadow-none" switch style="width: 4em">
<span class="text-uppercase" v-if="search.search_foods_or">{{ $t("or") }}</span>
<span class="text-uppercase" v-else>{{ $t("and") }}</span>
</b-form-checkbox>
@ -235,7 +265,7 @@
></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" tyle="width: 100%" switch>
<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>
<span class="text-uppercase" v-else>{{ $t("and") }}</span>
</b-form-checkbox>
@ -250,7 +280,7 @@
<div class="col-12">
<b-input-group class="mt-2">
<treeselect
v-model="search.search_ratings"
v-model="search.search_rating"
:options="ratingOptions"
:flat="true"
:placeholder="$t('Ratings')"
@ -258,8 +288,16 @@
@input="refreshData(false)"
style="flex-grow: 1; flex-shrink: 1; flex-basis: 0"
/>
<!-- <b-input-group-append>
<b-input-group-text style="width: 85px"> </b-input-group-text>
</b-input-group-append> -->
<b-input-group-append>
<b-input-group-text style="width: 85px"></b-input-group-text>
<b-input-group-text>
<b-form-checkbox v-model="search.search_rating_gte" name="check-button" @change="refreshData(false)" class="shadow-none" switch style="width: 4em">
<span class="text-uppercase" v-if="search.search_rating_gte">&gt;=</span>
<span class="text-uppercase" v-else>&lt;=</span>
</b-form-checkbox>
</b-input-group-text>
</b-input-group-append>
</b-input-group>
</div>
@ -279,7 +317,7 @@
></generic-multiselect>
<b-input-group-append>
<b-input-group-text>
<b-form-checkbox v-model="search.search_units_or" name="check-button" @change="refreshData(false)" class="shadow-none" tyle="width: 100%" switch>
<b-form-checkbox v-model="search.search_units_or" name="check-button" @change="refreshData(false)" class="shadow-none" style="width: 4em" switch>
<span class="text-uppercase" v-if="search.search_units_or">{{ $t("or") }}</span>
<span class="text-uppercase" v-else>{{ $t("and") }}</span>
</b-form-checkbox>
@ -339,8 +377,8 @@ import { ApiMixin, ResolveUrlMixin } from "@/utils/utils"
import LoadingSpinner from "@/components/LoadingSpinner" // TODO: is this deprecated?
import RecipeCard from "@/components/RecipeCard"
import GenericMultiselect from "@/components/GenericMultiselect"
import { Treeselect, LOAD_CHILDREN_OPTIONS } from "@riophae/vue-treeselect" //TODO: delete
import "@riophae/vue-treeselect/dist/vue-treeselect.css" //TODO: delete
import { Treeselect, LOAD_CHILDREN_OPTIONS } from "@riophae/vue-treeselect"
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
import RecipeSwitcher from "@/components/Buttons/RecipeSwitcher"
Vue.use(VueCookies)
@ -366,15 +404,15 @@ export default {
search_input: "",
search_internal: false,
search_keywords: [
{ items: [], operator: true },
{ items: [], operator: true },
{ items: [], operator: true },
{ items: [], operator: true },
{ items: [], operator: true, not: false },
{ items: [], operator: true, not: false },
{ items: [], operator: true, not: false },
{ items: [], operator: true, not: false },
],
search_foods: [],
search_books: [],
search_units: [],
search_ratings: undefined,
search_rating: undefined,
search_rating_gte: true,
search_keywords_or: true,
search_foods_or: true,
@ -382,7 +420,11 @@ export default {
search_units_or: true,
pagination_page: 1,
expert_mode: false,
keyword_fields: 1,
keywords_fields: 1,
food_fields: 1,
book_fields: 1,
rating_fields: 1,
unit_fields: 1,
},
ui: {
show_meal_plan: true,
@ -410,6 +452,7 @@ export default {
computed: {
ratingOptions: function () {
let ratingCount = undefined
let label = undefined
if (Object.keys(this.facets?.Ratings ?? {}).length === 0) {
ratingCount = (x) => {
return ""
@ -419,24 +462,52 @@ export default {
return ` (${x})`
}
}
let label = ""
if (this.search.search_rating_gte) {
label = this.$t("and_up")
label = (x) => {
if (x == 5) {
return ""
} else {
return this.$t("and_up")
}
}
} else {
label = this.$t("and_down")
label = (x) => {
if (x == 1) {
return ""
} else {
return this.$t("and_down")
}
}
}
return [
{ id: 5, label: "⭐⭐⭐⭐⭐" + ratingCount(this.facets.Ratings?.["5.0"] ?? 0) },
{ id: 4, label: "⭐⭐⭐⭐ " + this.$t("and_up") + ratingCount(this.facets.Ratings?.["4.0"] ?? 0) },
{ id: 3, label: "⭐⭐⭐ " + this.$t("and_up") + ratingCount(this.facets.Ratings?.["3.0"] ?? 0) },
{ id: 2, label: "⭐⭐ " + this.$t("and_up") + ratingCount(this.facets.Ratings?.["2.0"] ?? 0) },
{ id: 1, label: "⭐ " + this.$t("and_up") + ratingCount(this.facets.Ratings?.["1.0"] ?? 0) },
{ id: 5, label: "⭐⭐⭐⭐⭐" + label(5) + ratingCount(this.facets.Ratings?.["5.0"] ?? 0) },
{ id: 4, label: "⭐⭐⭐⭐ " + label() + ratingCount(this.facets.Ratings?.["4.0"] ?? 0) },
{ id: 3, label: "⭐⭐⭐ " + label() + ratingCount(this.facets.Ratings?.["3.0"] ?? 0) },
{ id: 2, label: "⭐⭐ " + label() + ratingCount(this.facets.Ratings?.["2.0"] ?? 0) },
{ id: 1, label: "⭐ " + label(1) + ratingCount(this.facets.Ratings?.["1.0"] ?? 0) },
{ id: 0, label: this.$t("Unrated") + ratingCount(this.facets.Ratings?.["0.0"] ?? 0) },
]
},
expertMode: function () {
return this.ui.enable_expert && this.search.expert_mode
},
keywordFields: function () {
return !this.expertMode ? 1 : this.search.keywords_fields
},
foodFields: function () {
return !this.expertMode ? 1 : this.search.food_fields
},
bookFields: function () {
return !this.expertMode ? 1 : this.search.book_fields
},
ratingFields: function () {
return !this.expertMode ? 1 : this.search.rating_fields
},
unitFields: function () {
return !this.expertMode ? 1 : this.search.unit_fields
},
},
mounted() {
this.$nextTick(function () {
@ -478,7 +549,7 @@ export default {
}
this.facets.Keywords = []
for (let x of this.search.search_keywords) {
for (let x of this.search.search_keywords.map((x) => x.items).flat()) {
this.facets.Keywords.push({ id: x, name: "loading..." })
}
@ -532,37 +603,7 @@ export default {
methods: {
// this.genericAPI inherited from ApiMixin
refreshData: function (random) {
console.log(this.search.search_keywords)
this.random_search = random
let params = {
query: this.search.search_input,
keywords: this.search.search_keywords[0].items.map(function (A) {
return A?.["id"] ?? A
}),
foods: this.search.search_foods.map(function (A) {
return A?.["id"] ?? A
}),
rating: this.search.search_ratings,
units: this.search.search_units.map(function (A) {
return A["id"]
}),
books: this.search.search_books.map(function (A) {
return A["id"]
}),
keywordsOr: this.search.search_keywords_or,
foodsOr: this.search.search_foods_or,
booksOr: this.search.search_books_or,
unitsOr: this.search.search_units_or,
internal: this.search.search_internal,
random: this.random_search,
_new: this.ui.sort_by_new,
page: this.search.pagination_page,
pageSize: this.search.page_size,
}
if (!this.searchFiltered) {
params.options = { query: { last_viewed: this.ui.recently_viewed } }
}
// console.log(params, this.search.search_keywords[0], this.search.search_keywords[0].items)
let params = this.buildParams(random)
this.genericAPI(this.Models.RECIPE, this.Actions.LIST, params)
.then((result) => {
window.scrollTo(0, 0)
@ -619,11 +660,13 @@ export default {
resetSearch: function () {
this.search.search_input = ""
this.search.search_internal = false
this.search.search_keywords[0].items = []
this.search.search_keywords = this.search.search_keywords.map((x) => {
return { ...x, items: [] }
})
this.search.search_foods = []
this.search.search_books = []
this.search.search_units = []
this.search.search_ratings = undefined
this.search.search_rating = undefined
this.search.pagination_page = 1
this.refreshData(false)
},
@ -682,16 +725,24 @@ export default {
}
}
},
buildParams: function () {
buildParams: function (random) {
this.random_search = random
let rating = this.search.search_rating
if (rating !== undefined && !this.search.search_rating_gte) {
rating = rating * -1
}
// TODO check expertmode
this.addFields("keywords")
let params = {
...this.addFields("keywords"),
query: this.search.search_input,
keywords: this.search.search_keywords[0].items,
foods: this.search.search_foods,
rating: this.search.search_ratings,
foods: this.search.search_foods.map(function (A) {
return A?.["id"] ?? A
}),
rating: rating,
books: this.search.search_books.map(function (A) {
return A["id"]
}),
keywordsOr: this.search.search_keywords_or,
foodsOr: this.search.search_foods_or,
booksOr: this.search.search_books_or,
internal: this.search.search_internal,
@ -703,6 +754,8 @@ export default {
if (!this.searchFiltered()) {
params.options = { query: { last_viewed: this.ui.recently_viewed } }
}
console.log(params)
return params
},
searchFiltered: function (ignore_string = false) {
let filtered =
@ -711,7 +764,7 @@ export default {
this.search?.search_books?.length === 0 &&
// this.settings?.pagination_page === 1 &&
!this.random_search &&
this.search?.search_ratings === undefined
this.search?.search_rating === undefined
if (ignore_string) {
return !filtered
@ -719,10 +772,57 @@ export default {
return !filtered && this.search?.search_input !== ""
}
},
addFields(field) {
let fieldlist = this.search[`search_${field}`].slice(0, this.search[`${field}_fields`])
return {
[`${field}_or`]: fieldlist
.filter((x) => x.operator == true && x.not == false)
.map((x) => x.items)
.flat()
.map((x) => x?.id ?? x),
[`${field}_and`]: fieldlist
.filter((x) => x.operator == false && x.not == false)
.map((x) => x.items)
.flat()
.map((x) => x?.id ?? x),
[`${field}_or_not`]: fieldlist
.filter((x) => x.operator == true && x.not == true)
.map((x) => x.items)
.flat()
.map((x) => x?.id ?? x),
[`${field}_and_not`]: fieldlist
.filter((x) => x.operator == false && x.not == true)
.map((x) => x.items)
.flat()
.map((x) => x?.id ?? x),
}
},
},
}
</script>
<style src="vue-multiselect/dist/vue-multiselect.min.css"></style>
<style></style>
<style>
.vue-treeselect__control {
border-radius: 0px !important;
height: 44px;
}
.multiselect__tags {
border-radius: 0px !important;
line-height: 22px;
}
/* copied from vue-multiselect */
.vue-treeselect__placeholder {
font-weight: 400;
font-family: inherit;
text-align: left;
font-size: 14px;
margin-bottom: 10px;
padding-top: 2px;
}
/* copied from vue-multiselect */
.vue-treeselect__control-arrow-container {
width: 30px;
}
</style>

View File

@ -308,5 +308,6 @@
"show_books": "Show Books",
"show_rating": "Show Rating",
"show_units": "Show Units",
"show_filters": "Show Filters"
"show_filters": "Show Filters",
"not": "not"
}

View File

@ -433,7 +433,26 @@ export class Models {
name: "Recipe",
apiName: "Recipe",
list: {
params: ["query", "keywords", "foods", "units", "rating", "books", "keywordsOr", "foodsOr", "booksOr", "internal", "random", "_new", "page", "pageSize", "options"],
params: [
"query",
"keywords",
"keywords_or",
"keywords_and",
"keywords_or_not",
"keywords_and_not",
"foods",
"units",
"rating",
"books",
"foodsOr",
"booksOr",
"internal",
"random",
"_new",
"page",
"pageSize",
"options",
],
// 'config': {
// 'foods': {'type': 'string'},
// 'keywords': {'type': 'string'},

View File

@ -3054,12 +3054,15 @@ export interface UserPreference {
* @memberof UserPreference
*/
shopping_add_onhand?: boolean;
<<<<<<< HEAD
/**
*
* @type {boolean}
* @memberof UserPreference
*/
left_handed?: boolean;
=======
>>>>>>> complex keyword filters
}
/**
@ -5279,12 +5282,15 @@ 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.
* @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} [foods] ID of food a recipe should have. For multiple repeat parameter.
* @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} [keywordsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided keywords.
* @param {string} [foodsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided foods.
* @param {string} [booksOr] If recipe should be in all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided books.
* @param {string} [internal] If only internal recipes should be returned. [true/&lt;b&gt;false&lt;/b&gt;]
@ -5295,7 +5301,7 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRecipes: async (query?: string, keywords?: number, foods?: number, units?: number, rating?: number, books?: string, keywordsOr?: string, foodsOr?: 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, units?: number, rating?: number, books?: string, foodsOr?: string, booksOr?: string, 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);
@ -5316,6 +5322,22 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
localVarQueryParameter['keywords'] = keywords;
}
if (keywordsOr !== undefined) {
localVarQueryParameter['keywords_or'] = keywordsOr;
}
if (keywordsAnd !== undefined) {
localVarQueryParameter['keywords_and'] = keywordsAnd;
}
if (keywordsOrNot !== undefined) {
localVarQueryParameter['keywords_or_not'] = keywordsOrNot;
}
if (keywordsAndNot !== undefined) {
localVarQueryParameter['keywords_and_not'] = keywordsAndNot;
}
if (foods !== undefined) {
localVarQueryParameter['foods'] = foods;
}
@ -5332,10 +5354,6 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
localVarQueryParameter['books'] = books;
}
if (keywordsOr !== undefined) {
localVarQueryParameter['keywords_or'] = keywordsOr;
}
if (foodsOr !== undefined) {
localVarQueryParameter['foods_or'] = foodsOr;
}
@ -9669,12 +9687,15 @@ 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.
* @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} [foods] ID of food a recipe should have. For multiple repeat parameter.
* @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} [keywordsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided keywords.
* @param {string} [foodsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided foods.
* @param {string} [booksOr] If recipe should be in all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided books.
* @param {string} [internal] If only internal recipes should be returned. [true/&lt;b&gt;false&lt;/b&gt;]
@ -9685,8 +9706,8 @@ export const ApiApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listRecipes(query?: string, keywords?: number, foods?: number, units?: number, rating?: number, books?: string, keywordsOr?: string, foodsOr?: 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, foods, units, rating, books, keywordsOr, foodsOr, booksOr, internal, random, _new, page, pageSize, options);
async listRecipes(query?: string, keywords?: number, keywordsOr?: number, keywordsAnd?: number, keywordsOrNot?: number, keywordsAndNot?: number, foods?: number, units?: number, rating?: number, books?: string, foodsOr?: 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, units, rating, books, foodsOr, booksOr, internal, random, _new, page, pageSize, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
@ -11354,12 +11375,15 @@ 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.
* @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} [foods] ID of food a recipe should have. For multiple repeat parameter.
* @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} [keywordsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided keywords.
* @param {string} [foodsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided foods.
* @param {string} [booksOr] If recipe should be in all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided books.
* @param {string} [internal] If only internal recipes should be returned. [true/&lt;b&gt;false&lt;/b&gt;]
@ -11370,8 +11394,8 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRecipes(query?: string, keywords?: number, foods?: number, units?: number, rating?: number, books?: string, keywordsOr?: string, foodsOr?: string, booksOr?: string, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any): AxiosPromise<InlineResponse2004> {
return localVarFp.listRecipes(query, keywords, foods, units, rating, books, keywordsOr, foodsOr, 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, units?: number, rating?: number, books?: string, foodsOr?: 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, units, rating, books, foodsOr, booksOr, internal, random, _new, page, pageSize, options).then((request) => request(axios, basePath));
},
/**
*
@ -13063,12 +13087,15 @@ 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.
* @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} [foods] ID of food a recipe should have. For multiple repeat parameter.
* @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} [keywordsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided keywords.
* @param {string} [foodsOr] If recipe should have all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided foods.
* @param {string} [booksOr] If recipe should be in all (AND&#x3D;false) or any (OR&#x3D;&lt;b&gt;true&lt;/b&gt;) of the provided books.
* @param {string} [internal] If only internal recipes should be returned. [true/&lt;b&gt;false&lt;/b&gt;]
@ -13080,8 +13107,8 @@ export class ApiApi extends BaseAPI {
* @throws {RequiredError}
* @memberof ApiApi
*/
public listRecipes(query?: string, keywords?: number, foods?: number, units?: number, rating?: number, books?: string, keywordsOr?: string, foodsOr?: string, booksOr?: string, internal?: string, random?: string, _new?: string, page?: number, pageSize?: number, options?: any) {
return ApiApiFp(this.configuration).listRecipes(query, keywords, foods, units, rating, books, keywordsOr, foodsOr, 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, units?: number, rating?: number, books?: string, foodsOr?: 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, units, rating, books, foodsOr, booksOr, internal, random, _new, page, pageSize, options).then((request) => request(this.axios, this.basePath));
}
/**