fetchVisualAlternatives

fetch list of possible visual alternatives for a given food name.

 /**
   * fetch list of possible visual alternatives for a given food name.
   * @param foodName - query for foodName.
   * @returns A `Promise` resolving to a `PassioFetchAdvisorInfoResult`.
   */
  fetchVisualAlternatives(
    foodName: string
  ): Promise<PassioFetchAdvisorInfoResult>
 try {
          // Fetch food results from the PassioSDK based on the query
          const result = await PassioSDK.fetchVisualAlternatives("apple")
          console.warn(result)
        } catch (error) {
        }

Last updated