Synopsis
A simple to use Yummly API wrapper for Nodejs.
Installation
$ npm install ws-yummly
Usage
var Yummly = ; Yummly;
API
getMeta(type, [display])
type: holiday, allergy, course, cuisine, diet, ingredient
display: clean, raw (default)
Yummly; # output id: '388' shortDescription: 'Lacto vegetarian' longDescription: 'Lacto vegetarian' searchValue: '388^Lacto vegetarian' type: 'diet' localesAvailableIn: 'en-US' ... ...
maxTotalTimeInSeconds(number)
Maximum time in seconds it may take to prepare the meal
maxResults(number)
Maximum results from the API
start(number)
Start getting recipes from start number
minRating(number)
Minumum rating a recipe can have (1-5)
maxRating(number)
Maximum rating a recipe can have (1-5)
maxRating value will be ignored when lower then minRating
allowedIngredients(string or array)
for a list of allowed ingredients use:
Yummly
excludedIngredients(string or array)
for a list of allowed ingredients use:
Yummly
allowedAllergies(string or array)
for a list of possible values use:
Yummly
excludedAllergies(string or array)
for a list of possible values use:
Yummly
allowedDiets(string or array)
for a list of possible values use:
Yummly
excludedDiets(string or array)
for a list of possible values use:
Yummly
allowedCuisines(string or array)
for a list of possible values use:
Yummly
excludedCuisines(string or array)
for a list of possible values use:
Yummly
allowedCourses(string or array)
for a list of possible values use:
Yummly
excludedCourses(string or array)
for a list of possible values use:
Yummly
allowedHolidays(string or array)
for a list of possible values use:
Yummly
excludedHolidays(string or array)
for a list of possible values use:
Yummly
requirePictures(boolean)
Wheter or not the recipes must have a image attached
paginate(number)
Paginates the result array into chunks
Yummly;
getURL()
Returns the current generated url
var url = Yummly; // url: https://api.yummly.com/v1/api/recipes?_app_id=YOUR_APP_ID&_app_key=YOUR_APP_KEY&q=pineapple&maxResult=40&excludedHoliday[]=holiday^holiday-halloween
getWithURL()
Returns the current generated url
var url = https://api.yummly.com/v1/api/recipes?_app_id=YOUR_APP_ID&_app_key=YOUR_APP_KEY&q=pineapple&maxResult=10; Yummly); // url: https://api.yummly.com/v1/api/recipes?_app_id=YOUR_APP_ID&_app_key=YOUR_APP_KEY&q=pineapple&maxResult=40&excludedHoliday[]=holiday^holiday-halloween
getSettings()
Returns the current generated setting object
var settings = Yummly; // settings: { maxResults: 40, paginate: 10, excludedHolidays: [ 'halloween' ] }
getDetails()
Returns details for recipes
var recipes = 'Apple-Walnut-Cranberry-Salad-898353' 'Heavenly-Strawberry_s-650499' 'Chopped-Taco-Mason-Jar-Salad-1266468' ; Yummly;
get()
Returns a promise with possible results
Yummly;
Example
Yummly ; # Thai Shrimp and Pineapple Curry # Thai Pineapple Fried Rice # Asian Pineapple Sauce # Thai Pineapple Fried Rice # Asian Caramelized Pineapple # Thai Pineapple Fried Rice # ...