-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e2a70f
commit 942fbcc
Showing
10 changed files
with
1,271 additions
and
20 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// RecipeObject.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
/** Please read the description of each field in this API response object example. By default, the value of each field is **null**. This indicates an unknown state or that no data exists. */ | ||
open class RecipeObject: JSONEncodable { | ||
/** An array containing an object for each individual item returned by your API call. */ | ||
public var items: [RecipeObjectItems]? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["items"] = self.items?.encodeToJSON() | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
SwaggerClient/Classes/Swaggers/Models/RecipeObjectAttributes.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// RecipeObjectAttributes.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
/** An object containing recipe attributes */ | ||
open class RecipeObjectAttributes: JSONEncodable { | ||
/** The time it takes to prep this recipe */ | ||
public var prepTime: String? | ||
/** The total time it takes to make this recipe */ | ||
public var totalTime: String? | ||
/** The number of servings this recipe makes */ | ||
public var servings: String? | ||
/** The size of each serving */ | ||
public var servingSize: String? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["prep_time"] = self.prepTime | ||
nillableDictionary["total_time"] = self.totalTime | ||
nillableDictionary["servings"] = self.servings | ||
nillableDictionary["serving_size"] = self.servingSize | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
SwaggerClient/Classes/Swaggers/Models/RecipeObjectIngredients.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// RecipeObjectIngredients.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
/** An object containing information about a specific recipe ingredient */ | ||
open class RecipeObjectIngredients: JSONEncodable { | ||
/** The quantity of this ingredient */ | ||
public var quantity: String? | ||
/** A description of this ingredient */ | ||
public var description: String? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["quantity"] = self.quantity | ||
nillableDictionary["description"] = self.description | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
SwaggerClient/Classes/Swaggers/Models/RecipeObjectItems.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// RecipeObjectItems.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
/** An object containing information for this specific item. */ | ||
open class RecipeObjectItems: JSONEncodable { | ||
/** Unique recipe ID */ | ||
public var id: String? | ||
/** Recipe title */ | ||
public var title: String? | ||
public var meta: RecipeObjectMeta? | ||
public var categories: [String]? | ||
/** The author of this recipe. You must attribute this author when displaying this recipe. */ | ||
public var author: String? | ||
public var keywords: [String]? | ||
public var topics: [String]? | ||
public var attributes: RecipeObjectAttributes? | ||
/** An array containing this recipe's ingredients */ | ||
public var ingredients: [RecipeObjectIngredients]? | ||
public var baseIngredients: [String]? | ||
public var nutrients: RecipeObjectNutrients? | ||
public var diabeticExchanges: [String]? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["id"] = self.id | ||
nillableDictionary["title"] = self.title | ||
nillableDictionary["meta"] = self.meta?.encodeToJSON() | ||
nillableDictionary["categories"] = self.categories?.encodeToJSON() | ||
nillableDictionary["author"] = self.author | ||
nillableDictionary["keywords"] = self.keywords?.encodeToJSON() | ||
nillableDictionary["topics"] = self.topics?.encodeToJSON() | ||
nillableDictionary["attributes"] = self.attributes?.encodeToJSON() | ||
nillableDictionary["ingredients"] = self.ingredients?.encodeToJSON() | ||
nillableDictionary["base_ingredients"] = self.baseIngredients?.encodeToJSON() | ||
nillableDictionary["nutrients"] = self.nutrients?.encodeToJSON() | ||
nillableDictionary["diabetic_exchanges"] = self.diabeticExchanges?.encodeToJSON() | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
SwaggerClient/Classes/Swaggers/Models/RecipeObjectMeta.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// RecipeObjectMeta.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
/** An object containing this item's compatibility grades for each supported diet */ | ||
open class RecipeObjectMeta: JSONEncodable { | ||
/** URL to the recipe. You must link back to the recipe when displaying it. */ | ||
public var url: String? | ||
public var images: RecipeObjectMetaImages? | ||
/** The source of the recipe. You must attribute this source when displaying this recipe. */ | ||
public var source: String? | ||
/** This recipe's cuisine */ | ||
public var cuisine: String? | ||
/** The date when this recipe was created */ | ||
public var created: String? | ||
/** The date when this recipe was most recently modified */ | ||
public var modified: String? | ||
/** Additional information about this recipe's nutrients */ | ||
public var nutrientsNotice: String? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["url"] = self.url | ||
nillableDictionary["images"] = self.images?.encodeToJSON() | ||
nillableDictionary["source"] = self.source | ||
nillableDictionary["cuisine"] = self.cuisine | ||
nillableDictionary["created"] = self.created | ||
nillableDictionary["modified"] = self.modified | ||
nillableDictionary["nutrients_notice"] = self.nutrientsNotice | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
SwaggerClient/Classes/Swaggers/Models/RecipeObjectMetaImages.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// RecipeObjectMetaImages.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
/** An object containing this recipe's image URLs */ | ||
open class RecipeObjectMetaImages: JSONEncodable { | ||
/** Extra large recipe image */ | ||
public var extraLarge: String? | ||
/** Large recipe image */ | ||
public var large: String? | ||
/** Standard recipe image */ | ||
public var standard: String? | ||
/** Grid view recipe image */ | ||
public var gridView: String? | ||
/** Small recipe image */ | ||
public var small: String? | ||
/** Thumbnail recipe image */ | ||
public var thumbnail: String? | ||
/** Extra small recipe image */ | ||
public var extraSmall: String? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["extra_large"] = self.extraLarge | ||
nillableDictionary["large"] = self.large | ||
nillableDictionary["standard"] = self.standard | ||
nillableDictionary["grid_view"] = self.gridView | ||
nillableDictionary["small"] = self.small | ||
nillableDictionary["thumbnail"] = self.thumbnail | ||
nillableDictionary["extra_small"] = self.extraSmall | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
SwaggerClient/Classes/Swaggers/Models/RecipeObjectNutrients.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// RecipeObjectNutrients.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
/** An object containing nutrient information for this recipe */ | ||
open class RecipeObjectNutrients: JSONEncodable { | ||
/** An array containing information for calories found in this recipe */ | ||
public var calories: [RecipeObjectNutrientsCalories]? | ||
/** An array containing information for this recipe's daily recommended value of certain nutrients */ | ||
public var dailyValues: [RecipeObjectNutrientsCalories]? | ||
/** An array containing information for fat found in this recipe */ | ||
public var fat: [RecipeObjectNutrientsCalories]? | ||
/** An array containing information for carbs found in this recipe */ | ||
public var carbs: [RecipeObjectNutrientsCalories]? | ||
/** An array containing information for vitamins found in this recipe */ | ||
public var vitamins: [RecipeObjectNutrientsCalories]? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["calories"] = self.calories?.encodeToJSON() | ||
nillableDictionary["daily_values"] = self.dailyValues?.encodeToJSON() | ||
nillableDictionary["fat"] = self.fat?.encodeToJSON() | ||
nillableDictionary["carbs"] = self.carbs?.encodeToJSON() | ||
nillableDictionary["vitamins"] = self.vitamins?.encodeToJSON() | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
SwaggerClient/Classes/Swaggers/Models/RecipeObjectNutrientsCalories.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// | ||
// RecipeObjectNutrientsCalories.swift | ||
// | ||
// Generated by swagger-codegen | ||
// https://github.com/swagger-api/swagger-codegen | ||
// | ||
|
||
import Foundation | ||
|
||
|
||
open class RecipeObjectNutrientsCalories: JSONEncodable { | ||
/** Nutrient name */ | ||
public var title: String? | ||
/** The amount of this nutrient in this recipe */ | ||
public var value: String? | ||
/** The daily recommended percent total for this nutrient */ | ||
public var percent: String? | ||
|
||
public init() {} | ||
|
||
// MARK: JSONEncodable | ||
open func encodeToJSON() -> Any { | ||
var nillableDictionary = [String:Any?]() | ||
nillableDictionary["title"] = self.title | ||
nillableDictionary["value"] = self.value | ||
nillableDictionary["percent"] = self.percent | ||
|
||
let dictionary: [String:Any] = APIHelper.rejectNil(nillableDictionary) ?? [:] | ||
return dictionary | ||
} | ||
} |