yummly 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -40,13 +40,13 @@ Once configured, you have access to two API calls:
40
40
 
41
41
  The search command returns an array of Yummly::Recipe objects:
42
42
 
43
- Yummly::Api.search('Onion soup')
43
+ Yummly.search('Onion soup')
44
44
 
45
45
  #### Find
46
46
 
47
47
  The find command returns a single Yummly::Recipe object:
48
48
 
49
- Yummly::Api.find('French-Onion-Soup-The-Pioneer-Woman-Cooks-_-Ree-Drummond-41364')
49
+ Yummly.find('French-Onion-Soup-The-Pioneer-Woman-Cooks-_-Ree-Drummond-41364')
50
50
 
51
51
  ## The Recipe object
52
52
 
@@ -57,7 +57,7 @@ from the ruby Recipe object.
57
57
 
58
58
  For example, to access the thumbnail image for a recipe:
59
59
 
60
- recipe = Yummly::Api.find('French-Onion-Soup-The-Pioneer-Woman-Cooks-_-Ree-Drummond-41364')
60
+ recipe = Yummly.find('French-Onion-Soup-The-Pioneer-Woman-Cooks-_-Ree-Drummond-41364')
61
61
  recipe.images.first.small_url
62
62
 
63
63
  Explore the Yummly::Recipe class to see the full range of available attributes.
data/lib/yummly/flavor.rb CHANGED
@@ -9,11 +9,12 @@ class Yummly::Flavor
9
9
  :sourness
10
10
 
11
11
  def initialize(values)
12
- @spiciness = values["spicy"]
13
- @bitterness = values["bitter"]
14
- @sweetness = values["sweet"]
15
- @savoriness = values["meaty"]
16
- @sourness = values["sour"]
12
+ @spiciness = values["Piquant"]
13
+ @bitterness = values["Bitter"]
14
+ @sweetness = values["Sweet"]
15
+ @savoriness = values["Meaty"]
16
+ @sourness = values["Sour"]
17
+ @saltiness = values["Salty"]
17
18
  end
18
19
 
19
20
  end
data/lib/yummly/recipe.rb CHANGED
@@ -46,7 +46,7 @@ class Yummly::Recipe
46
46
 
47
47
  # @return [Array] collection of strings of ingredients.
48
48
  def ingredients
49
- response["ingredients"]
49
+ response["ingredients"] || ingredient_lines
50
50
  end
51
51
 
52
52
  # @return [Array] collection of strings of ingredients.
@@ -89,6 +89,12 @@ class Yummly::Recipe
89
89
  response["totalTimeInSeconds"]
90
90
  end
91
91
 
92
+ def thumbnail
93
+ if images
94
+ images.first.small_url
95
+ end
96
+ end
97
+
92
98
  private
93
99
 
94
100
  # The search and find API calls populate different image attribute nodes in their respective responses. This method
@@ -1,3 +1,3 @@
1
1
  module Yummly
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yummly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: