Skip to content

Swift API for fetching recipes online using Recipe Puppy

License

Notifications You must be signed in to change notification settings

l-priebe/SwiftyRecipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

SwiftyRecipes

Swift API for fetching recipes online using Recipe Puppy http://www.recipepuppy.com.

Usage

  1. Include the files from the SwiftyRecipes folder in your project
  2. Use the SRRecipeClient to fetch recipes online
  3. Store the recipes as SRRecipe objects

Examples

Below are some simple examples of using the API.

Fetching recipes by keyword/query

let query = "italian"
var recipes: [SRRecipe]?
SRPuppyClient.sharedClient().fetchRecipesWithQuery(query, completionHandler: {
    result, _ in
    recipes = result
})
print(recipes)

Fetching recipes by ingredients

let ingredients = ["tomato", "cucumber", "onion"]
var recipes: [SRRecipe]?
SRPuppyClient.sharedClient().fetchRecipesWithIngredients(ingredients, completionHandler: {
    result, _ in
    recipes = result
})
print(recipes)

About

Swift API for fetching recipes online using Recipe Puppy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages