kontent-delivery-sdk-ruby 2.0.12 → 2.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -21
  3. data/README.md +575 -543
  4. data/bin/console +14 -14
  5. data/bin/setup +8 -8
  6. data/lib/delivery/builders/image_transformation_builder.rb +271 -271
  7. data/lib/delivery/builders/url_builder.rb +120 -117
  8. data/lib/delivery/client/delivery_client.rb +176 -155
  9. data/lib/delivery/client/delivery_query.rb +302 -286
  10. data/lib/delivery/client/request_manager.rb +125 -121
  11. data/lib/delivery/models/content_item.rb +153 -153
  12. data/lib/delivery/models/content_type.rb +41 -41
  13. data/lib/delivery/models/pagination.rb +22 -22
  14. data/lib/delivery/models/taxonomy_group.rb +39 -39
  15. data/lib/delivery/query_parameters/filters.rb +158 -158
  16. data/lib/delivery/query_parameters/parameter_base.rb +46 -46
  17. data/lib/delivery/query_parameters/query_string.rb +78 -78
  18. data/lib/delivery/resolvers/content_link_resolver.rb +102 -102
  19. data/lib/delivery/resolvers/inline_content_item_resolver.rb +75 -75
  20. data/lib/delivery/resolvers/linked_item_resolver.rb +37 -37
  21. data/lib/delivery/responses/delivery_element_response.rb +34 -34
  22. data/lib/delivery/responses/delivery_item_listing_response.rb +54 -54
  23. data/lib/delivery/responses/delivery_item_response.rb +40 -40
  24. data/lib/delivery/responses/delivery_items_feed_response.rb +58 -0
  25. data/lib/delivery/responses/delivery_taxonomy_listing_response.rb +47 -47
  26. data/lib/delivery/responses/delivery_taxonomy_response.rb +33 -33
  27. data/lib/delivery/responses/delivery_type_listing_response.rb +46 -46
  28. data/lib/delivery/responses/delivery_type_response.rb +32 -32
  29. data/lib/delivery/responses/response_base.rb +39 -39
  30. data/lib/delivery/tests/401.json +5 -5
  31. data/lib/delivery/tests/429.json +4 -4
  32. data/lib/delivery/tests/fake_responder.rb +110 -84
  33. data/lib/delivery/tests/filtering/items_gt.json +565 -565
  34. data/lib/delivery/tests/filtering/items_with_count.json +4985 -4985
  35. data/lib/delivery/tests/filtering/multiple.json +282 -282
  36. data/lib/delivery/tests/filtering/pagination_about_us.json +646 -646
  37. data/lib/delivery/tests/generic/items.json +4984 -4984
  38. data/lib/delivery/tests/generic/items/about_us.json +227 -227
  39. data/lib/delivery/tests/generic/items/aeropress_filters.json +138 -138
  40. data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +168 -168
  41. data/lib/delivery/tests/generic/items/empty_rich_text.json +24 -0
  42. data/lib/delivery/tests/generic/items/rich_text_complex_tables.json +81 -0
  43. data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +620 -620
  44. data/lib/delivery/tests/generic/taxonomies.json +126 -126
  45. data/lib/delivery/tests/generic/types.json +780 -780
  46. data/lib/delivery/tests/generic/types/brewer/elements/product_status.json +5 -5
  47. data/lib/delivery/tests/items_feed/articles_feed_1.json +39 -0
  48. data/lib/delivery/tests/items_feed/articles_feed_2.json +78 -0
  49. data/lib/delivery/tests/items_feed/articles_feed_3.json +104 -0
  50. data/lib/delivery/version.rb +7 -7
  51. data/lib/kontent-delivery-sdk-ruby.rb +20 -19
  52. metadata +40 -15
@@ -1,6 +1,6 @@
1
- {
2
- "message": "Missing or invalid access token. Please include the valid access token value in the Authorization header field as an HTTP bearer authorization scheme.",
3
- "request_id": "|89bb1503b14c254a91bd57c135329822.d31c99c5_",
4
- "error_code": 3,
5
- "specific_code": 0
1
+ {
2
+ "message": "Missing or invalid access token. Please include the valid access token value in the Authorization header field as an HTTP bearer authorization scheme.",
3
+ "request_id": "|89bb1503b14c254a91bd57c135329822.d31c99c5_",
4
+ "error_code": 3,
5
+ "specific_code": 0
6
6
  }
@@ -1,5 +1,5 @@
1
- {
2
- "request_id": "80000004-0002-fd00-b63f-84710c7967bb",
3
- "error_code": 10000,
4
- "message": "API rate limit exceeded. Please retry your request later."
1
+ {
2
+ "request_id": "80000004-0002-fd00-b63f-84710c7967bb",
3
+ "error_code": 10000,
4
+ "message": "API rate limit exceeded. Please retry your request later."
5
5
  }
@@ -1,84 +1,110 @@
1
- require 'dotenv/load'
2
- require 'pathname'
3
- require 'cgi'
4
- require 'ostruct'
5
-
6
- module Kentico
7
- module Kontent
8
- module Delivery
9
- module Tests
10
- class FakeResponder
11
- PROJECT_ID = ENV['PROJECT_ID']
12
- IS_SECURE = ENV['TEST_SECURE_API_ENABLED']
13
- SECURE_KEY = ENV['SECURE_KEY']
14
- PREVIEW_KEY = ENV['PREVIEW_KEY']
15
- BASE_URL = "https://deliver.kontent.ai/#{PROJECT_ID}".freeze
16
- PREVIEW_URL = "https://preview-deliver.kontent.ai/#{PROJECT_ID}".freeze
17
-
18
- class << self
19
- def get_response(query, url, headers)
20
- @query = query
21
- if IS_SECURE && !(
22
- headers['Authorization'] == "Bearer #{SECURE_KEY}" ||
23
- headers['Authorization'] == "Bearer #{PREVIEW_KEY}"
24
- )
25
- return respond_401
26
- end
27
-
28
- url =
29
- if @query.should_preview
30
- url[PREVIEW_URL.length...url.length]
31
- else
32
- url[BASE_URL.length...url.length]
33
- end
34
-
35
- return respond_429 if @query.code_name == '429'
36
-
37
- qs = url.contains('?') ? url.split('?')[1] : nil
38
- return respond_filtering qs unless qs.nil? # e.g. /items/about_us?skip=0&limit=5
39
-
40
- respond_generic url # Didn't match other clauses, so response should be located in corresponding filepath
41
- end
42
-
43
- def respond_generic(url)
44
- path = Pathname.new(File.dirname(__FILE__) + "/generic#{url}.json")
45
- OpenStruct.new(
46
- headers: '',
47
- body: path.read
48
- )
49
- end
50
-
51
- def respond_filtering(query)
52
- path =
53
- case CGI.unescape query
54
- when 'includeTotalCount=1'
55
- Pathname.new(File.dirname(__FILE__) + '/filtering/items_with_count.json')
56
- when 'skip=0&limit=5'
57
- Pathname.new(File.dirname(__FILE__) + '/filtering/pagination_about_us.json')
58
- when 'elements.price[gt]=20'
59
- Pathname.new(File.dirname(__FILE__) + '/filtering/items_gt.json')
60
- when 'elements.price[gt]=20&system.type=grinder'
61
- Pathname.new(File.dirname(__FILE__) + '/filtering/multiple.json')
62
- end
63
- OpenStruct.new(
64
- headers: '',
65
- body: path.read
66
- )
67
- ##Kentico::Kontent::Delivery::Responses::ResponseBase.new 200, '', '', path.read if path.exist?
68
- end
69
-
70
- def respond_429
71
- path = Pathname.new(File.dirname(__FILE__) + '/429.json')
72
- Kentico::Kontent::Delivery::Responses::ResponseBase.new 429, '', '', path.read if path.exist?
73
- end
74
-
75
- def respond_401
76
- path = Pathname.new(File.dirname(__FILE__) + '/401.json')
77
- Kentico::Kontent::Delivery::Responses::ResponseBase.new 401, '', '', path.read if path.exist?
78
- end
79
- end
80
- end
81
- end
82
- end
83
- end
84
- end
1
+ require 'dotenv/load'
2
+ require 'pathname'
3
+ require 'cgi'
4
+ require 'ostruct'
5
+
6
+ module Kentico
7
+ module Kontent
8
+ module Delivery
9
+ module Tests
10
+ class FakeResponder
11
+ PROJECT_ID = ENV['PROJECT_ID']
12
+ IS_SECURE = ENV['TEST_SECURE_API_ENABLED']
13
+ SECURE_KEY = ENV['SECURE_KEY']
14
+ PREVIEW_KEY = ENV['PREVIEW_KEY']
15
+ BASE_URL = "https://deliver.kontent.ai/#{PROJECT_ID}".freeze
16
+ PREVIEW_URL = "https://preview-deliver.kontent.ai/#{PROJECT_ID}".freeze
17
+ CONTINUATION_HEADER_1 = '+RID:~lmJ4ALSekwpBTQAAAAAADA==#RT:1#TRC:100#RTD:NrCNpn14PWTcji51F4ccBWJlYm5geGZqaHBtZWBgYHVmdHVqbnBvamJtAA==#ISV:2#IEO:65551#QCF:1#FPC:AggAAAAAADAAAAMAAAAAMAAAAAAAAAAwAAD2AgPA4N8A+A8+EYAkABBCCEEQgBAAK4BRABCSFoAhAACgQgBg4AMAMgAAqAEAM4BPgAXAICSSgAAAoBIEAFEAgANTAP7/AwAACC6AAcADACyAVABSRWIUIoqAAH2ABMCAQpFEEQAEAEIAGDAMABuAI4AyAACQCwAzACJBJBJIQhgAUYJIBFGiAhAERSKKSCkQADIAAP4fACIAqQAQABEAAAURAABgL4AEwA+APwD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AhADAAEgCrBWg1YgCA/w8AEgDg8f8AIQB+ABMAQBQgAEoAUQAABzKAIgACWAAELoAFwG21DhUJUqmmqgBvggCAH4IBwOMAcQDAARmAQ4ABwABQz4AEwP8AAMD//w8AsQGAATIAIoABAoEAMAATAACQqto2Ir+ADYC4gCIAAAMIAGiAmIBhAAD4EUAPAEQAASTAA1wFAwAfgAOADYAVgZIAAKASACGAMQC/AZIAsCAEAJIAEAQCAMGABcAA8P7/////wwEAwIABAQCgIQAA+D2AT4ACwPD/hwDRAmAAooARAAwAggIg+B4AoQAAYCuAK4ARgBOAQgAA4AMAroBcgW2BmII8gA2AUwCA//9PhwBsgAbAEAQAgACAvx8D+AcAKICigALABgAIAHuAE4BggI6AGYChAAMAmIBWhAIAAAAAMAAADgFyAqCAAgA2gBmALoCxAAAD4wAACRAgAAJjAMAA9+8DAGSAKoAggDIBXAEQAG6AAIAogDCAPYAGgJEAACh/gFEAAAejAGB/8///B5GAIQBgAOEAyB6SAECAMQAZgBGAuoAqgIGAAIAOgA+A7oBMgCiAD4AJgAHAPAARgAHAMABDAAB+AYHz/xFA3/9TQP/fGwAQIBEAgANiAPgAAAgRAMAAEQGVAL6AA8AAIgMAAQCxAABIIYKBAOARQQPkATEAQARwgZOBCYIhAYABARcGAFaAUAAiQP8PAGBRARgAMgAA0P8AIIBBAAyANUBP4Pf+AQDw/0kCMgAAwOcBIQAAMDWAWIAvgKEAwAAugBEAwAIDAAAAADAAAHQAn4EAgBQEABz/D0EA8AFiABgcBACzBQDAj/8DAGqAQQAA4BIAADwCEBEAjAESADAOCAAhAGAQNwBEjt8/wOAHAO8DEiA4ABEB4AEiAA8A4A9xCQc4QgCDAABAMwDA/zf//wc0AAAHEFCAgf8AMwAAPIAB+OM='.freeze
20
+
21
+ class << self
22
+ def get_response(query, url, headers)
23
+ @query = query
24
+ if IS_SECURE && !(
25
+ headers['Authorization'] == "Bearer #{SECURE_KEY}" ||
26
+ headers['Authorization'] == "Bearer #{PREVIEW_KEY}"
27
+ )
28
+ return respond_401
29
+ end
30
+
31
+ url =
32
+ if @query.should_preview
33
+ url[PREVIEW_URL.length...url.length]
34
+ else
35
+ url[BASE_URL.length...url.length]
36
+ end
37
+
38
+ return respond_429 if @query.code_name == '429'
39
+
40
+ qs = url.contains('?') ? url.split('?')[1] : nil
41
+
42
+ return respond_feed if query.query_type.eql? Kentico::Kontent::Delivery::QUERY_TYPE_ITEMS_FEED
43
+
44
+ return respond_filtering qs unless qs.nil? # e.g. /items/about_us?skip=0&limit=5
45
+
46
+ respond_generic url # Didn't match other clauses, so response should be located in corresponding filepath
47
+ end
48
+
49
+ def respond_generic(url)
50
+ path = Pathname.new(File.dirname(__FILE__) + "/generic#{url}.json")
51
+ OpenStruct.new(
52
+ headers: '',
53
+ body: path.read
54
+ )
55
+ end
56
+
57
+ def respond_feed
58
+ if @query.continuation_exists?
59
+ if @query.continuation_token.include? '#RT:1#'
60
+ headers = {Kentico::Kontent::Delivery::DeliveryQuery::HEADER_CONTINUATION => CONTINUATION_HEADER_2}
61
+ path = Pathname.new(File.dirname(__FILE__) + '/items_feed/articles_feed_2.json')
62
+ else
63
+ headers = ''
64
+ path = Pathname.new(File.dirname(__FILE__) + '/items_feed/articles_feed_3.json')
65
+ end
66
+ else
67
+ headers = {Kentico::Kontent::Delivery::DeliveryQuery::HEADER_CONTINUATION => CONTINUATION_HEADER_1}
68
+ path = Pathname.new(File.dirname(__FILE__) + '/items_feed/articles_feed_1.json')
69
+ end
70
+
71
+ OpenStruct.new(
72
+ headers: headers,
73
+ body: path.read
74
+ )
75
+ end
76
+
77
+ def respond_filtering(query)
78
+ path =
79
+ case CGI.unescape query
80
+ when 'includeTotalCount=1'
81
+ Pathname.new(File.dirname(__FILE__) + '/filtering/items_with_count.json')
82
+ when 'skip=0&limit=5'
83
+ Pathname.new(File.dirname(__FILE__) + '/filtering/pagination_about_us.json')
84
+ when 'elements.price[gt]=20'
85
+ Pathname.new(File.dirname(__FILE__) + '/filtering/items_gt.json')
86
+ when 'elements.price[gt]=20&system.type=grinder'
87
+ Pathname.new(File.dirname(__FILE__) + '/filtering/multiple.json')
88
+ end
89
+ OpenStruct.new(
90
+ headers: '',
91
+ body: path.read
92
+ )
93
+ ##Kentico::Kontent::Delivery::Responses::ResponseBase.new 200, '', '', path.read if path.exist?
94
+ end
95
+
96
+ def respond_429
97
+ path = Pathname.new(File.dirname(__FILE__) + '/429.json')
98
+ Kentico::Kontent::Delivery::Responses::ResponseBase.new 429, '', '', path.read if path.exist?
99
+ end
100
+
101
+ def respond_401
102
+ path = Pathname.new(File.dirname(__FILE__) + '/401.json')
103
+ Kentico::Kontent::Delivery::Responses::ResponseBase.new 401, '', '', path.read if path.exist?
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+ end
110
+ end
@@ -1,566 +1,566 @@
1
- {
2
- "items": [
3
- {
4
- "system": {
5
- "id": "5d6167df-e39d-4877-999d-49e6e96fd8b0",
6
- "name": "AeroPress",
7
- "codename": "aeropress",
8
- "language": "en-US",
9
- "type": "brewer",
10
- "sitemap_locations": [
11
- "brewers"
12
- ],
13
- "last_modified": "2017-12-08T08:31:38.283Z"
14
- },
15
- "elements": {
16
- "product_name": {
17
- "type": "text",
18
- "name": "Product name",
19
- "value": "AeroPress"
20
- },
21
- "price": {
22
- "type": "number",
23
- "name": "Price",
24
- "value": 25.9
25
- },
26
- "image": {
27
- "type": "asset",
28
- "name": "Image",
29
- "value": [
30
- {
31
- "name": "aeropress.jpg",
32
- "type": "image/jpeg",
33
- "size": 72879,
34
- "description": "AeroPress Coffee Maker",
35
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/3eee7d6e-0542-48ca-ab1e-35657f36dcfd/aeropress.jpg"
36
- }
37
- ]
38
- },
39
- "product_status": {
40
- "type": "taxonomy",
41
- "name": "Product status",
42
- "taxonomy_group": "product_status",
43
- "value": [
44
- {
45
- "name": "Bestseller",
46
- "codename": "bestseller"
47
- }
48
- ]
49
- },
50
- "short_description": {
51
- "type": "rich_text",
52
- "name": "Short description",
53
- "images": {},
54
- "links": {},
55
- "modular_content": [],
56
- "value": "<p>AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. &nbsp;</p>"
57
- },
58
- "long_description": {
59
- "type": "rich_text",
60
- "name": "Long description",
61
- "images": {},
62
- "links": {},
63
- "modular_content": [],
64
- "value": "<p>Presenting a coffee-making revolution, the AeroPress Coffee Maker.<br><br>Affordable and straightforward for producing top notch coffee with. If you enjoy delicious and smooth coffee, you've come to the right place. With the innovative AeroPress, you'll be enjoying your perfect cup in no time.<br><br>Using this device, you'll be amazed at how good your coffee can taste. Its ease of use will amaze you even more. Coffee making with the versatile brewing technique offered by AeroPress. Any kind of coffee, from any part of the world will taste its best when combined with AeroPress. If you just want to enjoy the perfect quick cup, or you enjoy tinkering with the delicacies of coffee brewing, the AeroPress Coffee Maker will hit the spot!<br><br>Each AeroPress comes with a pack of filters included in the box. &nbsp;</p>"
65
- },
66
- "url_pattern": {
67
- "type": "url_slug",
68
- "name": "URL pattern",
69
- "value": "aeropress"
70
- },
71
- "manufacturer": {
72
- "type": "taxonomy",
73
- "name": "Manufacturer",
74
- "taxonomy_group": "manufacturer",
75
- "value": [
76
- {
77
- "name": "Aerobie",
78
- "codename": "aerobie"
79
- }
80
- ]
81
- },
82
- "metadata__meta_title": {
83
- "type": "text",
84
- "name": "Meta title",
85
- "value": "AeroPress"
86
- },
87
- "metadata__meta_description": {
88
- "type": "text",
89
- "name": "Meta description",
90
- "value": "AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. "
91
- },
92
- "metadata__og_title": {
93
- "type": "text",
94
- "name": "og:title",
95
- "value": "AeroPress"
96
- },
97
- "metadata__og_description": {
98
- "type": "text",
99
- "name": "og:description",
100
- "value": "AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. "
101
- },
102
- "metadata__og_image": {
103
- "type": "asset",
104
- "name": "og:image",
105
- "value": [
106
- {
107
- "name": "aeropress.jpg",
108
- "type": "image/jpeg",
109
- "size": 72879,
110
- "description": "AeroPress Coffee Maker",
111
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/3eee7d6e-0542-48ca-ab1e-35657f36dcfd/aeropress.jpg"
112
- }
113
- ]
114
- },
115
- "metadata__twitter_site": {
116
- "type": "text",
117
- "name": "twitter:site",
118
- "value": "Dancing Goat"
119
- },
120
- "metadata__twitter_creator": {
121
- "type": "text",
122
- "name": "twitter:creator",
123
- "value": "@kenticokontent"
124
- },
125
- "metadata__twitter_title": {
126
- "type": "text",
127
- "name": "twitter:title",
128
- "value": "AeroPress"
129
- },
130
- "metadata__twitter_description": {
131
- "type": "text",
132
- "name": "twitter:description",
133
- "value": "AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. "
134
- },
135
- "metadata__twitter_image": {
136
- "type": "asset",
137
- "name": "twitter:image",
138
- "value": [
139
- {
140
- "name": "aeropress.jpg",
141
- "type": "image/jpeg",
142
- "size": 72879,
143
- "description": "AeroPress Coffee Maker",
144
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/3eee7d6e-0542-48ca-ab1e-35657f36dcfd/aeropress.jpg"
145
- }
146
- ]
147
- }
148
- }
149
- },
150
- {
151
- "system": {
152
- "id": "a116aa95-df64-4172-ae8c-743ed8b6d0d8",
153
- "name": "Hario Buono Kettle",
154
- "codename": "hario_buono_kettle",
155
- "language": "en-US",
156
- "type": "accessory",
157
- "sitemap_locations": [
158
- "accessories"
159
- ],
160
- "last_modified": "2017-12-08T08:43:37.478Z"
161
- },
162
- "elements": {
163
- "product_name": {
164
- "type": "text",
165
- "name": "Product name",
166
- "value": "Hario Buono Kettle"
167
- },
168
- "price": {
169
- "type": "number",
170
- "name": "Price",
171
- "value": 23.9
172
- },
173
- "image": {
174
- "type": "asset",
175
- "name": "Image",
176
- "value": [
177
- {
178
- "name": "hario-buono-kettle.jpg",
179
- "type": "image/jpeg",
180
- "size": 64293,
181
- "description": "Hario Buono 0.8 Liter Kettle, Silver",
182
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/352b0e8c-2a1b-4aa0-91fd-961e88ab954a/hario-buono-kettle.jpg"
183
- }
184
- ]
185
- },
186
- "manufacturer": {
187
- "type": "text",
188
- "name": "Manufacturer",
189
- "value": "Hario"
190
- },
191
- "product_status": {
192
- "type": "taxonomy",
193
- "name": "Product status",
194
- "taxonomy_group": "product_status",
195
- "value": []
196
- },
197
- "short_description": {
198
- "type": "rich_text",
199
- "name": "Short description",
200
- "images": {},
201
- "links": {},
202
- "modular_content": [],
203
- "value": "<p>The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision.</p>"
204
- },
205
- "long_description": {
206
- "type": "rich_text",
207
- "name": "Long description",
208
- "images": {},
209
- "links": {},
210
- "modular_content": [],
211
- "value": "<p>The smallest variant in the Hario Buono Kettle family. Look at its long, thin nozzle. It's not just a pretty design; it was developed to provide you with the ability to pour water with the greatest precision.</p><p>Keep in mind that the shape was designed especially for the V60 porcelain filter. But hey, don't limit your imagination. You can use the Hario Buono Kettle to pour not only whatever coffee you like, but you can also use it for watering your plants if that's what you want.</p><p>The kettle is big enough for four cups (1 liter).</p>"
212
- },
213
- "url_pattern": {
214
- "type": "url_slug",
215
- "name": "URL pattern",
216
- "value": "hario-buono-kettle"
217
- },
218
- "metadata__meta_title": {
219
- "type": "text",
220
- "name": "Meta title",
221
- "value": "Hario Buono Kettle"
222
- },
223
- "metadata__meta_description": {
224
- "type": "text",
225
- "name": "Meta description",
226
- "value": "The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision."
227
- },
228
- "metadata__og_title": {
229
- "type": "text",
230
- "name": "og:title",
231
- "value": "Hario Buono Kettle"
232
- },
233
- "metadata__og_description": {
234
- "type": "text",
235
- "name": "og:description",
236
- "value": "The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision."
237
- },
238
- "metadata__og_image": {
239
- "type": "asset",
240
- "name": "og:image",
241
- "value": [
242
- {
243
- "name": "hario-buono-kettle.jpg",
244
- "type": "image/jpeg",
245
- "size": 64293,
246
- "description": "Hario Buono 0.8 Liter Kettle, Silver",
247
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/352b0e8c-2a1b-4aa0-91fd-961e88ab954a/hario-buono-kettle.jpg"
248
- }
249
- ]
250
- },
251
- "metadata__twitter_site": {
252
- "type": "text",
253
- "name": "twitter:site",
254
- "value": "Dancing Goat"
255
- },
256
- "metadata__twitter_creator": {
257
- "type": "text",
258
- "name": "twitter:creator",
259
- "value": "@kenticokontent"
260
- },
261
- "metadata__twitter_title": {
262
- "type": "text",
263
- "name": "twitter:title",
264
- "value": "Hario Buono Kettle"
265
- },
266
- "metadata__twitter_description": {
267
- "type": "text",
268
- "name": "twitter:description",
269
- "value": "The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision."
270
- },
271
- "metadata__twitter_image": {
272
- "type": "asset",
273
- "name": "twitter:image",
274
- "value": [
275
- {
276
- "name": "hario-buono-kettle.jpg",
277
- "type": "image/jpeg",
278
- "size": 64293,
279
- "description": "Hario Buono 0.8 Liter Kettle, Silver",
280
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/352b0e8c-2a1b-4aa0-91fd-961e88ab954a/hario-buono-kettle.jpg"
281
- }
282
- ]
283
- }
284
- }
285
- },
286
- {
287
- "system": {
288
- "id": "3ae25151-244c-4db5-80ed-9ac44a7b8a31",
289
- "name": "Hario Mini Mill Slim",
290
- "codename": "hario_mini_mill_slim",
291
- "language": "en-US",
292
- "type": "grinder",
293
- "sitemap_locations": [
294
- "grinders"
295
- ],
296
- "last_modified": "2017-12-08T08:44:56.117Z"
297
- },
298
- "elements": {
299
- "product_name": {
300
- "type": "text",
301
- "name": "Product name",
302
- "value": "Hario Mini Mill Slim"
303
- },
304
- "price": {
305
- "type": "number",
306
- "name": "Price",
307
- "value": 23.9
308
- },
309
- "image": {
310
- "type": "asset",
311
- "name": "Image",
312
- "value": [
313
- {
314
- "name": "hario-mini-mill.jpg",
315
- "type": "image/jpeg",
316
- "size": 41478,
317
- "description": "Hario Mini Mill Slim Hand Coffee Grinder",
318
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
319
- }
320
- ]
321
- },
322
- "manufacturer": {
323
- "type": "text",
324
- "name": "Manufacturer",
325
- "value": "Hario"
326
- },
327
- "product_status": {
328
- "type": "taxonomy",
329
- "name": "Product status",
330
- "taxonomy_group": "product_status",
331
- "value": []
332
- },
333
- "short_description": {
334
- "type": "rich_text",
335
- "name": "Short description",
336
- "images": {},
337
- "links": {},
338
- "modular_content": [],
339
- "value": "<p>The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body.</p>"
340
- },
341
- "long_description": {
342
- "type": "rich_text",
343
- "name": "Long description",
344
- "images": {},
345
- "links": {},
346
- "modular_content": [],
347
- "value": "<p>Are you a traveler? Then this is a grinder for you. It's so small, it fits backpacks and suitcases, light because of its plastic but elegant body, and also durable, so it can sustain even the longest journeys. Although it's compact, you can hold up to 24 grams. After use, just put it in a dishwasher or wash it by hand, it's so easy. Simply choose any brewing method you like.</p>"
348
- },
349
- "url_pattern": {
350
- "type": "url_slug",
351
- "name": "URL pattern",
352
- "value": "hario-mini-mill-slim"
353
- },
354
- "metadata__meta_title": {
355
- "type": "text",
356
- "name": "Meta title",
357
- "value": "Hario Mini Mill Slim"
358
- },
359
- "metadata__meta_description": {
360
- "type": "text",
361
- "name": "Meta description",
362
- "value": "The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body."
363
- },
364
- "metadata__og_title": {
365
- "type": "text",
366
- "name": "og:title",
367
- "value": "Hario Mini Mill Slim"
368
- },
369
- "metadata__og_description": {
370
- "type": "text",
371
- "name": "og:description",
372
- "value": "The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body."
373
- },
374
- "metadata__og_image": {
375
- "type": "asset",
376
- "name": "og:image",
377
- "value": [
378
- {
379
- "name": "hario-mini-mill.jpg",
380
- "type": "image/jpeg",
381
- "size": 41478,
382
- "description": "Hario Mini Mill Slim Hand Coffee Grinder",
383
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
384
- }
385
- ]
386
- },
387
- "metadata__twitter_site": {
388
- "type": "text",
389
- "name": "twitter:site",
390
- "value": "Dancing Goat"
391
- },
392
- "metadata__twitter_creator": {
393
- "type": "text",
394
- "name": "twitter:creator",
395
- "value": "@kenticokontent"
396
- },
397
- "metadata__twitter_title": {
398
- "type": "text",
399
- "name": "twitter:title",
400
- "value": "Hario Mini Mill Slim"
401
- },
402
- "metadata__twitter_description": {
403
- "type": "text",
404
- "name": "twitter:description",
405
- "value": "The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body."
406
- },
407
- "metadata__twitter_image": {
408
- "type": "asset",
409
- "name": "twitter:image",
410
- "value": [
411
- {
412
- "name": "hario-mini-mill.jpg",
413
- "type": "image/jpeg",
414
- "size": 41478,
415
- "description": "Hario Mini Mill Slim Hand Coffee Grinder",
416
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
417
- }
418
- ]
419
- }
420
- }
421
- },
422
- {
423
- "system": {
424
- "id": "6a4bbe7b-e6ce-4f79-a006-174708cb91e6",
425
- "name": "Porlex Tall Ceramic Burr Grinder",
426
- "codename": "porlex_tall_ceramic_burr_grinder",
427
- "language": "en-US",
428
- "type": "grinder",
429
- "sitemap_locations": [
430
- "grinders"
431
- ],
432
- "last_modified": "2017-12-08T09:31:24.067Z"
433
- },
434
- "elements": {
435
- "product_name": {
436
- "type": "text",
437
- "name": "Product name",
438
- "value": "Porlex Tall Ceramic Burr Grinder"
439
- },
440
- "price": {
441
- "type": "number",
442
- "name": "Price",
443
- "value": 32.9
444
- },
445
- "image": {
446
- "type": "asset",
447
- "name": "Image",
448
- "value": [
449
- {
450
- "name": "porlex-tall-ceramic-burr-grinder.jpg",
451
- "type": "image/jpeg",
452
- "size": 37996,
453
- "description": "Hand Coffee Grinder",
454
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/a58bf56b-962e-44dd-9fae-b562e3322119/porlex-tall-ceramic-burr-grinder.jpg"
455
- }
456
- ]
457
- },
458
- "manufacturer": {
459
- "type": "text",
460
- "name": "Manufacturer",
461
- "value": "Porlex"
462
- },
463
- "product_status": {
464
- "type": "taxonomy",
465
- "name": "Product status",
466
- "taxonomy_group": "product_status",
467
- "value": []
468
- },
469
- "short_description": {
470
- "type": "rich_text",
471
- "name": "Short description",
472
- "images": {},
473
- "links": {},
474
- "modular_content": [],
475
- "value": "<p>An extra-durable grinder with strong conical ceramic burrs&nbsp;that fits perfectly in your hands.</p>"
476
- },
477
- "long_description": {
478
- "type": "rich_text",
479
- "name": "Long description",
480
- "images": {},
481
- "links": {},
482
- "modular_content": [],
483
- "value": "<p>Are you looking for a firm, extra-durable, but also a little static grinder? The Porlex Tall Ceramic Burr Grinder is all from stainless steel except for the burrs. Those strong conical burrs are ceramic, so they won't rust and are also sharper than steel burrs will ever be. The grinder is also able to be adjusted for many different variants of grind setting to cover all your needs.</p><p>As to the size, the grinder is 7.3\" (18.5 cm) tall and 1.9\" (4.9 cm)&nbsp; in diameter, without the handle, so it perfectly fits your hands. You can put up to 1 oz (30 g) of beans inside. It's also very easy to wash.</p>"
484
- },
485
- "url_pattern": {
486
- "type": "url_slug",
487
- "name": "URL pattern",
488
- "value": "porlex-tall-ceramic-burr-grinder"
489
- },
490
- "metadata__meta_title": {
491
- "type": "text",
492
- "name": "Meta title",
493
- "value": "Porlex Tall Ceramic Burr Grinder"
494
- },
495
- "metadata__meta_description": {
496
- "type": "text",
497
- "name": "Meta description",
498
- "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
499
- },
500
- "metadata__og_title": {
501
- "type": "text",
502
- "name": "og:title",
503
- "value": "Porlex Tall Ceramic Burr Grinder"
504
- },
505
- "metadata__og_description": {
506
- "type": "text",
507
- "name": "og:description",
508
- "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
509
- },
510
- "metadata__og_image": {
511
- "type": "asset",
512
- "name": "og:image",
513
- "value": [
514
- {
515
- "name": "porlex-tall-ceramic-burr-grinder.jpg",
516
- "type": "image/jpeg",
517
- "size": 37996,
518
- "description": "Hand Coffee Grinder",
519
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/a58bf56b-962e-44dd-9fae-b562e3322119/porlex-tall-ceramic-burr-grinder.jpg"
520
- }
521
- ]
522
- },
523
- "metadata__twitter_site": {
524
- "type": "text",
525
- "name": "twitter:site",
526
- "value": "Dancing Goat"
527
- },
528
- "metadata__twitter_creator": {
529
- "type": "text",
530
- "name": "twitter:creator",
531
- "value": "@kenticokontent"
532
- },
533
- "metadata__twitter_title": {
534
- "type": "text",
535
- "name": "twitter:title",
536
- "value": "Porlex Tall Ceramic Burr Grinder"
537
- },
538
- "metadata__twitter_description": {
539
- "type": "text",
540
- "name": "twitter:description",
541
- "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
542
- },
543
- "metadata__twitter_image": {
544
- "type": "asset",
545
- "name": "twitter:image",
546
- "value": [
547
- {
548
- "name": "porlex-tall-ceramic-burr-grinder.jpg",
549
- "type": "image/jpeg",
550
- "size": 37996,
551
- "description": "Hand Coffee Grinder",
552
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/a58bf56b-962e-44dd-9fae-b562e3322119/porlex-tall-ceramic-burr-grinder.jpg"
553
- }
554
- ]
555
- }
556
- }
557
- }
558
- ],
559
- "modular_content": {},
560
- "pagination": {
561
- "skip": 0,
562
- "limit": 0,
563
- "count": 4,
564
- "next_page": ""
565
- }
1
+ {
2
+ "items": [
3
+ {
4
+ "system": {
5
+ "id": "5d6167df-e39d-4877-999d-49e6e96fd8b0",
6
+ "name": "AeroPress",
7
+ "codename": "aeropress",
8
+ "language": "en-US",
9
+ "type": "brewer",
10
+ "sitemap_locations": [
11
+ "brewers"
12
+ ],
13
+ "last_modified": "2017-12-08T08:31:38.283Z"
14
+ },
15
+ "elements": {
16
+ "product_name": {
17
+ "type": "text",
18
+ "name": "Product name",
19
+ "value": "AeroPress"
20
+ },
21
+ "price": {
22
+ "type": "number",
23
+ "name": "Price",
24
+ "value": 25.9
25
+ },
26
+ "image": {
27
+ "type": "asset",
28
+ "name": "Image",
29
+ "value": [
30
+ {
31
+ "name": "aeropress.jpg",
32
+ "type": "image/jpeg",
33
+ "size": 72879,
34
+ "description": "AeroPress Coffee Maker",
35
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/3eee7d6e-0542-48ca-ab1e-35657f36dcfd/aeropress.jpg"
36
+ }
37
+ ]
38
+ },
39
+ "product_status": {
40
+ "type": "taxonomy",
41
+ "name": "Product status",
42
+ "taxonomy_group": "product_status",
43
+ "value": [
44
+ {
45
+ "name": "Bestseller",
46
+ "codename": "bestseller"
47
+ }
48
+ ]
49
+ },
50
+ "short_description": {
51
+ "type": "rich_text",
52
+ "name": "Short description",
53
+ "images": {},
54
+ "links": {},
55
+ "modular_content": [],
56
+ "value": "<p>AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. &nbsp;</p>"
57
+ },
58
+ "long_description": {
59
+ "type": "rich_text",
60
+ "name": "Long description",
61
+ "images": {},
62
+ "links": {},
63
+ "modular_content": [],
64
+ "value": "<p>Presenting a coffee-making revolution, the AeroPress Coffee Maker.<br><br>Affordable and straightforward for producing top notch coffee with. If you enjoy delicious and smooth coffee, you've come to the right place. With the innovative AeroPress, you'll be enjoying your perfect cup in no time.<br><br>Using this device, you'll be amazed at how good your coffee can taste. Its ease of use will amaze you even more. Coffee making with the versatile brewing technique offered by AeroPress. Any kind of coffee, from any part of the world will taste its best when combined with AeroPress. If you just want to enjoy the perfect quick cup, or you enjoy tinkering with the delicacies of coffee brewing, the AeroPress Coffee Maker will hit the spot!<br><br>Each AeroPress comes with a pack of filters included in the box. &nbsp;</p>"
65
+ },
66
+ "url_pattern": {
67
+ "type": "url_slug",
68
+ "name": "URL pattern",
69
+ "value": "aeropress"
70
+ },
71
+ "manufacturer": {
72
+ "type": "taxonomy",
73
+ "name": "Manufacturer",
74
+ "taxonomy_group": "manufacturer",
75
+ "value": [
76
+ {
77
+ "name": "Aerobie",
78
+ "codename": "aerobie"
79
+ }
80
+ ]
81
+ },
82
+ "metadata__meta_title": {
83
+ "type": "text",
84
+ "name": "Meta title",
85
+ "value": "AeroPress"
86
+ },
87
+ "metadata__meta_description": {
88
+ "type": "text",
89
+ "name": "Meta description",
90
+ "value": "AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. "
91
+ },
92
+ "metadata__og_title": {
93
+ "type": "text",
94
+ "name": "og:title",
95
+ "value": "AeroPress"
96
+ },
97
+ "metadata__og_description": {
98
+ "type": "text",
99
+ "name": "og:description",
100
+ "value": "AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. "
101
+ },
102
+ "metadata__og_image": {
103
+ "type": "asset",
104
+ "name": "og:image",
105
+ "value": [
106
+ {
107
+ "name": "aeropress.jpg",
108
+ "type": "image/jpeg",
109
+ "size": 72879,
110
+ "description": "AeroPress Coffee Maker",
111
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/3eee7d6e-0542-48ca-ab1e-35657f36dcfd/aeropress.jpg"
112
+ }
113
+ ]
114
+ },
115
+ "metadata__twitter_site": {
116
+ "type": "text",
117
+ "name": "twitter:site",
118
+ "value": "Dancing Goat"
119
+ },
120
+ "metadata__twitter_creator": {
121
+ "type": "text",
122
+ "name": "twitter:creator",
123
+ "value": "@kenticokontent"
124
+ },
125
+ "metadata__twitter_title": {
126
+ "type": "text",
127
+ "name": "twitter:title",
128
+ "value": "AeroPress"
129
+ },
130
+ "metadata__twitter_description": {
131
+ "type": "text",
132
+ "name": "twitter:description",
133
+ "value": "AeroPress presents this coffee-making revolution which is affordable and makes delicious and smooth coffee. "
134
+ },
135
+ "metadata__twitter_image": {
136
+ "type": "asset",
137
+ "name": "twitter:image",
138
+ "value": [
139
+ {
140
+ "name": "aeropress.jpg",
141
+ "type": "image/jpeg",
142
+ "size": 72879,
143
+ "description": "AeroPress Coffee Maker",
144
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/3eee7d6e-0542-48ca-ab1e-35657f36dcfd/aeropress.jpg"
145
+ }
146
+ ]
147
+ }
148
+ }
149
+ },
150
+ {
151
+ "system": {
152
+ "id": "a116aa95-df64-4172-ae8c-743ed8b6d0d8",
153
+ "name": "Hario Buono Kettle",
154
+ "codename": "hario_buono_kettle",
155
+ "language": "en-US",
156
+ "type": "accessory",
157
+ "sitemap_locations": [
158
+ "accessories"
159
+ ],
160
+ "last_modified": "2017-12-08T08:43:37.478Z"
161
+ },
162
+ "elements": {
163
+ "product_name": {
164
+ "type": "text",
165
+ "name": "Product name",
166
+ "value": "Hario Buono Kettle"
167
+ },
168
+ "price": {
169
+ "type": "number",
170
+ "name": "Price",
171
+ "value": 23.9
172
+ },
173
+ "image": {
174
+ "type": "asset",
175
+ "name": "Image",
176
+ "value": [
177
+ {
178
+ "name": "hario-buono-kettle.jpg",
179
+ "type": "image/jpeg",
180
+ "size": 64293,
181
+ "description": "Hario Buono 0.8 Liter Kettle, Silver",
182
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/352b0e8c-2a1b-4aa0-91fd-961e88ab954a/hario-buono-kettle.jpg"
183
+ }
184
+ ]
185
+ },
186
+ "manufacturer": {
187
+ "type": "text",
188
+ "name": "Manufacturer",
189
+ "value": "Hario"
190
+ },
191
+ "product_status": {
192
+ "type": "taxonomy",
193
+ "name": "Product status",
194
+ "taxonomy_group": "product_status",
195
+ "value": []
196
+ },
197
+ "short_description": {
198
+ "type": "rich_text",
199
+ "name": "Short description",
200
+ "images": {},
201
+ "links": {},
202
+ "modular_content": [],
203
+ "value": "<p>The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision.</p>"
204
+ },
205
+ "long_description": {
206
+ "type": "rich_text",
207
+ "name": "Long description",
208
+ "images": {},
209
+ "links": {},
210
+ "modular_content": [],
211
+ "value": "<p>The smallest variant in the Hario Buono Kettle family. Look at its long, thin nozzle. It's not just a pretty design; it was developed to provide you with the ability to pour water with the greatest precision.</p><p>Keep in mind that the shape was designed especially for the V60 porcelain filter. But hey, don't limit your imagination. You can use the Hario Buono Kettle to pour not only whatever coffee you like, but you can also use it for watering your plants if that's what you want.</p><p>The kettle is big enough for four cups (1 liter).</p>"
212
+ },
213
+ "url_pattern": {
214
+ "type": "url_slug",
215
+ "name": "URL pattern",
216
+ "value": "hario-buono-kettle"
217
+ },
218
+ "metadata__meta_title": {
219
+ "type": "text",
220
+ "name": "Meta title",
221
+ "value": "Hario Buono Kettle"
222
+ },
223
+ "metadata__meta_description": {
224
+ "type": "text",
225
+ "name": "Meta description",
226
+ "value": "The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision."
227
+ },
228
+ "metadata__og_title": {
229
+ "type": "text",
230
+ "name": "og:title",
231
+ "value": "Hario Buono Kettle"
232
+ },
233
+ "metadata__og_description": {
234
+ "type": "text",
235
+ "name": "og:description",
236
+ "value": "The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision."
237
+ },
238
+ "metadata__og_image": {
239
+ "type": "asset",
240
+ "name": "og:image",
241
+ "value": [
242
+ {
243
+ "name": "hario-buono-kettle.jpg",
244
+ "type": "image/jpeg",
245
+ "size": 64293,
246
+ "description": "Hario Buono 0.8 Liter Kettle, Silver",
247
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/352b0e8c-2a1b-4aa0-91fd-961e88ab954a/hario-buono-kettle.jpg"
248
+ }
249
+ ]
250
+ },
251
+ "metadata__twitter_site": {
252
+ "type": "text",
253
+ "name": "twitter:site",
254
+ "value": "Dancing Goat"
255
+ },
256
+ "metadata__twitter_creator": {
257
+ "type": "text",
258
+ "name": "twitter:creator",
259
+ "value": "@kenticokontent"
260
+ },
261
+ "metadata__twitter_title": {
262
+ "type": "text",
263
+ "name": "twitter:title",
264
+ "value": "Hario Buono Kettle"
265
+ },
266
+ "metadata__twitter_description": {
267
+ "type": "text",
268
+ "name": "twitter:description",
269
+ "value": "The Hario Buono Kettle is a coffee kettle with a characteristically long and thin nozzle designed for pouring water with the greatest precision."
270
+ },
271
+ "metadata__twitter_image": {
272
+ "type": "asset",
273
+ "name": "twitter:image",
274
+ "value": [
275
+ {
276
+ "name": "hario-buono-kettle.jpg",
277
+ "type": "image/jpeg",
278
+ "size": 64293,
279
+ "description": "Hario Buono 0.8 Liter Kettle, Silver",
280
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/352b0e8c-2a1b-4aa0-91fd-961e88ab954a/hario-buono-kettle.jpg"
281
+ }
282
+ ]
283
+ }
284
+ }
285
+ },
286
+ {
287
+ "system": {
288
+ "id": "3ae25151-244c-4db5-80ed-9ac44a7b8a31",
289
+ "name": "Hario Mini Mill Slim",
290
+ "codename": "hario_mini_mill_slim",
291
+ "language": "en-US",
292
+ "type": "grinder",
293
+ "sitemap_locations": [
294
+ "grinders"
295
+ ],
296
+ "last_modified": "2017-12-08T08:44:56.117Z"
297
+ },
298
+ "elements": {
299
+ "product_name": {
300
+ "type": "text",
301
+ "name": "Product name",
302
+ "value": "Hario Mini Mill Slim"
303
+ },
304
+ "price": {
305
+ "type": "number",
306
+ "name": "Price",
307
+ "value": 23.9
308
+ },
309
+ "image": {
310
+ "type": "asset",
311
+ "name": "Image",
312
+ "value": [
313
+ {
314
+ "name": "hario-mini-mill.jpg",
315
+ "type": "image/jpeg",
316
+ "size": 41478,
317
+ "description": "Hario Mini Mill Slim Hand Coffee Grinder",
318
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
319
+ }
320
+ ]
321
+ },
322
+ "manufacturer": {
323
+ "type": "text",
324
+ "name": "Manufacturer",
325
+ "value": "Hario"
326
+ },
327
+ "product_status": {
328
+ "type": "taxonomy",
329
+ "name": "Product status",
330
+ "taxonomy_group": "product_status",
331
+ "value": []
332
+ },
333
+ "short_description": {
334
+ "type": "rich_text",
335
+ "name": "Short description",
336
+ "images": {},
337
+ "links": {},
338
+ "modular_content": [],
339
+ "value": "<p>The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body.</p>"
340
+ },
341
+ "long_description": {
342
+ "type": "rich_text",
343
+ "name": "Long description",
344
+ "images": {},
345
+ "links": {},
346
+ "modular_content": [],
347
+ "value": "<p>Are you a traveler? Then this is a grinder for you. It's so small, it fits backpacks and suitcases, light because of its plastic but elegant body, and also durable, so it can sustain even the longest journeys. Although it's compact, you can hold up to 24 grams. After use, just put it in a dishwasher or wash it by hand, it's so easy. Simply choose any brewing method you like.</p>"
348
+ },
349
+ "url_pattern": {
350
+ "type": "url_slug",
351
+ "name": "URL pattern",
352
+ "value": "hario-mini-mill-slim"
353
+ },
354
+ "metadata__meta_title": {
355
+ "type": "text",
356
+ "name": "Meta title",
357
+ "value": "Hario Mini Mill Slim"
358
+ },
359
+ "metadata__meta_description": {
360
+ "type": "text",
361
+ "name": "Meta description",
362
+ "value": "The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body."
363
+ },
364
+ "metadata__og_title": {
365
+ "type": "text",
366
+ "name": "og:title",
367
+ "value": "Hario Mini Mill Slim"
368
+ },
369
+ "metadata__og_description": {
370
+ "type": "text",
371
+ "name": "og:description",
372
+ "value": "The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body."
373
+ },
374
+ "metadata__og_image": {
375
+ "type": "asset",
376
+ "name": "og:image",
377
+ "value": [
378
+ {
379
+ "name": "hario-mini-mill.jpg",
380
+ "type": "image/jpeg",
381
+ "size": 41478,
382
+ "description": "Hario Mini Mill Slim Hand Coffee Grinder",
383
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
384
+ }
385
+ ]
386
+ },
387
+ "metadata__twitter_site": {
388
+ "type": "text",
389
+ "name": "twitter:site",
390
+ "value": "Dancing Goat"
391
+ },
392
+ "metadata__twitter_creator": {
393
+ "type": "text",
394
+ "name": "twitter:creator",
395
+ "value": "@kenticokontent"
396
+ },
397
+ "metadata__twitter_title": {
398
+ "type": "text",
399
+ "name": "twitter:title",
400
+ "value": "Hario Mini Mill Slim"
401
+ },
402
+ "metadata__twitter_description": {
403
+ "type": "text",
404
+ "name": "twitter:description",
405
+ "value": "The Hario Mini Mill Slim is super suitable for traveling, can be hold up to 24 grams of coffee, and has an elegant plastic body."
406
+ },
407
+ "metadata__twitter_image": {
408
+ "type": "asset",
409
+ "name": "twitter:image",
410
+ "value": [
411
+ {
412
+ "name": "hario-mini-mill.jpg",
413
+ "type": "image/jpeg",
414
+ "size": 41478,
415
+ "description": "Hario Mini Mill Slim Hand Coffee Grinder",
416
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
417
+ }
418
+ ]
419
+ }
420
+ }
421
+ },
422
+ {
423
+ "system": {
424
+ "id": "6a4bbe7b-e6ce-4f79-a006-174708cb91e6",
425
+ "name": "Porlex Tall Ceramic Burr Grinder",
426
+ "codename": "porlex_tall_ceramic_burr_grinder",
427
+ "language": "en-US",
428
+ "type": "grinder",
429
+ "sitemap_locations": [
430
+ "grinders"
431
+ ],
432
+ "last_modified": "2017-12-08T09:31:24.067Z"
433
+ },
434
+ "elements": {
435
+ "product_name": {
436
+ "type": "text",
437
+ "name": "Product name",
438
+ "value": "Porlex Tall Ceramic Burr Grinder"
439
+ },
440
+ "price": {
441
+ "type": "number",
442
+ "name": "Price",
443
+ "value": 32.9
444
+ },
445
+ "image": {
446
+ "type": "asset",
447
+ "name": "Image",
448
+ "value": [
449
+ {
450
+ "name": "porlex-tall-ceramic-burr-grinder.jpg",
451
+ "type": "image/jpeg",
452
+ "size": 37996,
453
+ "description": "Hand Coffee Grinder",
454
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/a58bf56b-962e-44dd-9fae-b562e3322119/porlex-tall-ceramic-burr-grinder.jpg"
455
+ }
456
+ ]
457
+ },
458
+ "manufacturer": {
459
+ "type": "text",
460
+ "name": "Manufacturer",
461
+ "value": "Porlex"
462
+ },
463
+ "product_status": {
464
+ "type": "taxonomy",
465
+ "name": "Product status",
466
+ "taxonomy_group": "product_status",
467
+ "value": []
468
+ },
469
+ "short_description": {
470
+ "type": "rich_text",
471
+ "name": "Short description",
472
+ "images": {},
473
+ "links": {},
474
+ "modular_content": [],
475
+ "value": "<p>An extra-durable grinder with strong conical ceramic burrs&nbsp;that fits perfectly in your hands.</p>"
476
+ },
477
+ "long_description": {
478
+ "type": "rich_text",
479
+ "name": "Long description",
480
+ "images": {},
481
+ "links": {},
482
+ "modular_content": [],
483
+ "value": "<p>Are you looking for a firm, extra-durable, but also a little static grinder? The Porlex Tall Ceramic Burr Grinder is all from stainless steel except for the burrs. Those strong conical burrs are ceramic, so they won't rust and are also sharper than steel burrs will ever be. The grinder is also able to be adjusted for many different variants of grind setting to cover all your needs.</p><p>As to the size, the grinder is 7.3\" (18.5 cm) tall and 1.9\" (4.9 cm)&nbsp; in diameter, without the handle, so it perfectly fits your hands. You can put up to 1 oz (30 g) of beans inside. It's also very easy to wash.</p>"
484
+ },
485
+ "url_pattern": {
486
+ "type": "url_slug",
487
+ "name": "URL pattern",
488
+ "value": "porlex-tall-ceramic-burr-grinder"
489
+ },
490
+ "metadata__meta_title": {
491
+ "type": "text",
492
+ "name": "Meta title",
493
+ "value": "Porlex Tall Ceramic Burr Grinder"
494
+ },
495
+ "metadata__meta_description": {
496
+ "type": "text",
497
+ "name": "Meta description",
498
+ "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
499
+ },
500
+ "metadata__og_title": {
501
+ "type": "text",
502
+ "name": "og:title",
503
+ "value": "Porlex Tall Ceramic Burr Grinder"
504
+ },
505
+ "metadata__og_description": {
506
+ "type": "text",
507
+ "name": "og:description",
508
+ "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
509
+ },
510
+ "metadata__og_image": {
511
+ "type": "asset",
512
+ "name": "og:image",
513
+ "value": [
514
+ {
515
+ "name": "porlex-tall-ceramic-burr-grinder.jpg",
516
+ "type": "image/jpeg",
517
+ "size": 37996,
518
+ "description": "Hand Coffee Grinder",
519
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/a58bf56b-962e-44dd-9fae-b562e3322119/porlex-tall-ceramic-burr-grinder.jpg"
520
+ }
521
+ ]
522
+ },
523
+ "metadata__twitter_site": {
524
+ "type": "text",
525
+ "name": "twitter:site",
526
+ "value": "Dancing Goat"
527
+ },
528
+ "metadata__twitter_creator": {
529
+ "type": "text",
530
+ "name": "twitter:creator",
531
+ "value": "@kenticokontent"
532
+ },
533
+ "metadata__twitter_title": {
534
+ "type": "text",
535
+ "name": "twitter:title",
536
+ "value": "Porlex Tall Ceramic Burr Grinder"
537
+ },
538
+ "metadata__twitter_description": {
539
+ "type": "text",
540
+ "name": "twitter:description",
541
+ "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
542
+ },
543
+ "metadata__twitter_image": {
544
+ "type": "asset",
545
+ "name": "twitter:image",
546
+ "value": [
547
+ {
548
+ "name": "porlex-tall-ceramic-burr-grinder.jpg",
549
+ "type": "image/jpeg",
550
+ "size": 37996,
551
+ "description": "Hand Coffee Grinder",
552
+ "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/a58bf56b-962e-44dd-9fae-b562e3322119/porlex-tall-ceramic-burr-grinder.jpg"
553
+ }
554
+ ]
555
+ }
556
+ }
557
+ }
558
+ ],
559
+ "modular_content": {},
560
+ "pagination": {
561
+ "skip": 0,
562
+ "limit": 0,
563
+ "count": 4,
564
+ "next_page": ""
565
+ }
566
566
  }