UNPKG

chompthis

Version:

An unofficial API wrapper for chompthis.com made for Node.js

45 lines (44 loc) 1.3 kB
import brandedFoodObject from "../objects/brandedFoodObject"; interface IGetFoodBrandedBarcode { code: string; userId?: string; } interface IGetFoodBrandedName { name: string; limit?: number; page?: number; userId?: string; } interface IGetFoodBrandedSearch { allergen?: string; brand?: string; category?: string; country?: string; diet?: "Vegan" | "Vegetarian" | "Gluten Free"; ingredient?: string; keyword?: string; mineral?: string; nutrient?: string; palm_oil?: string; trace?: string; vitamin?: string; limit?: number; page?: number; userId?: string; } interface IGetFoodIngredientSearch { find: string; limit?: number; userId?: string; } export default class ChompClient { private apiKey; private apiBaseUrl; private axiosClient; constructor(apiKey: string, apiBaseUrl?: string); getFoodBrandedBarcode(params: IGetFoodBrandedBarcode): Promise<brandedFoodObject>; getFoodBrandedName(params: IGetFoodBrandedName): Promise<brandedFoodObject>; getFoodBrandedSearch(params: IGetFoodBrandedSearch): Promise<brandedFoodObject>; getFoodIngredientSearch(params: IGetFoodIngredientSearch): Promise<brandedFoodObject>; } export {};