kontent-delivery-sdk-ruby 2.0.18 → 2.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -21
  3. data/README.md +603 -576
  4. data/bin/console +14 -14
  5. data/bin/setup +8 -8
  6. data/lib/delivery/builders/image_transformation_builder.rb +272 -271
  7. data/lib/delivery/builders/url_builder.rb +123 -120
  8. data/lib/delivery/client/delivery_client.rb +184 -176
  9. data/lib/delivery/client/delivery_query.rb +302 -302
  10. data/lib/delivery/client/request_manager.rb +126 -125
  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/language.rb +29 -0
  14. data/lib/delivery/models/pagination.rb +22 -22
  15. data/lib/delivery/models/taxonomy_group.rb +39 -39
  16. data/lib/delivery/query_parameters/filters.rb +201 -158
  17. data/lib/delivery/query_parameters/parameter_base.rb +56 -46
  18. data/lib/delivery/query_parameters/query_string.rb +78 -78
  19. data/lib/delivery/resolvers/content_link_resolver.rb +102 -102
  20. data/lib/delivery/resolvers/inline_content_item_resolver.rb +75 -75
  21. data/lib/delivery/resolvers/linked_item_resolver.rb +43 -37
  22. data/lib/delivery/responses/delivery_element_response.rb +34 -34
  23. data/lib/delivery/responses/delivery_item_listing_response.rb +54 -54
  24. data/lib/delivery/responses/delivery_item_response.rb +40 -40
  25. data/lib/delivery/responses/delivery_items_feed_response.rb +58 -58
  26. data/lib/delivery/responses/delivery_language_listing_response.rb +44 -0
  27. data/lib/delivery/responses/delivery_taxonomy_listing_response.rb +47 -47
  28. data/lib/delivery/responses/delivery_taxonomy_response.rb +33 -33
  29. data/lib/delivery/responses/delivery_type_listing_response.rb +46 -46
  30. data/lib/delivery/responses/delivery_type_response.rb +32 -32
  31. data/lib/delivery/responses/response_base.rb +39 -39
  32. data/lib/delivery/tests/401.json +5 -5
  33. data/lib/delivery/tests/429.json +4 -4
  34. data/lib/delivery/tests/fake_responder.rb +99 -110
  35. data/lib/delivery/tests/filtering/items_with_count.json +5385 -4986
  36. data/lib/delivery/tests/filtering/{pagination_about_us.json → pagination.json} +761 -646
  37. data/lib/delivery/tests/generic/items.json +5383 -4984
  38. data/lib/delivery/tests/generic/items/about_us.json +276 -227
  39. data/lib/delivery/tests/generic/items/aeropress_filters.json +155 -138
  40. data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +565 -168
  41. data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +599 -621
  42. data/lib/delivery/tests/generic/languages.json +24 -0
  43. data/lib/delivery/tests/generic/taxonomies.json +203 -126
  44. data/lib/delivery/tests/generic/taxonomies/manufacturer.json +30 -0
  45. data/lib/delivery/tests/generic/types.json +836 -781
  46. data/lib/delivery/tests/generic/types/brewer.json +89 -0
  47. data/lib/delivery/tests/generic/types/brewer/elements/product_status.json +5 -5
  48. data/lib/delivery/tests/items_feed/articles_feed_1.json +39 -39
  49. data/lib/delivery/tests/items_feed/articles_feed_2.json +78 -78
  50. data/lib/delivery/tests/items_feed/articles_feed_3.json +104 -104
  51. data/lib/kontent-delivery-sdk-ruby.rb +22 -20
  52. metadata +30 -29
  53. data/lib/delivery/tests/filtering/items_gt.json +0 -566
  54. data/lib/delivery/tests/filtering/multiple.json +0 -283
  55. data/lib/delivery/version.rb +0 -7
@@ -1,283 +0,0 @@
1
- {
2
- "items": [
3
- {
4
- "system": {
5
- "id": "3ae25151-244c-4db5-80ed-9ac44a7b8a31",
6
- "name": "Hario Mini Mill Slim",
7
- "codename": "hario_mini_mill_slim",
8
- "language": "en-US",
9
- "type": "grinder",
10
- "sitemap_locations": [
11
- "grinders"
12
- ],
13
- "last_modified": "2017-12-08T08:44:56.117Z"
14
- },
15
- "elements": {
16
- "product_name": {
17
- "type": "text",
18
- "name": "Product name",
19
- "value": "Hario Mini Mill Slim"
20
- },
21
- "price": {
22
- "type": "number",
23
- "name": "Price",
24
- "value": 23.9
25
- },
26
- "image": {
27
- "type": "asset",
28
- "name": "Image",
29
- "value": [
30
- {
31
- "name": "hario-mini-mill.jpg",
32
- "type": "image/jpeg",
33
- "size": 41478,
34
- "description": "Hario Mini Mill Slim Hand Coffee Grinder",
35
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
36
- }
37
- ]
38
- },
39
- "manufacturer": {
40
- "type": "text",
41
- "name": "Manufacturer",
42
- "value": "Hario"
43
- },
44
- "product_status": {
45
- "type": "taxonomy",
46
- "name": "Product status",
47
- "taxonomy_group": "product_status",
48
- "value": []
49
- },
50
- "short_description": {
51
- "type": "rich_text",
52
- "name": "Short description",
53
- "images": {},
54
- "links": {},
55
- "modular_content": [],
56
- "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>"
57
- },
58
- "long_description": {
59
- "type": "rich_text",
60
- "name": "Long description",
61
- "images": {},
62
- "links": {},
63
- "modular_content": [],
64
- "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>"
65
- },
66
- "url_pattern": {
67
- "type": "url_slug",
68
- "name": "URL pattern",
69
- "value": "hario-mini-mill-slim"
70
- },
71
- "metadata__meta_title": {
72
- "type": "text",
73
- "name": "Meta title",
74
- "value": "Hario Mini Mill Slim"
75
- },
76
- "metadata__meta_description": {
77
- "type": "text",
78
- "name": "Meta description",
79
- "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."
80
- },
81
- "metadata__og_title": {
82
- "type": "text",
83
- "name": "og:title",
84
- "value": "Hario Mini Mill Slim"
85
- },
86
- "metadata__og_description": {
87
- "type": "text",
88
- "name": "og:description",
89
- "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."
90
- },
91
- "metadata__og_image": {
92
- "type": "asset",
93
- "name": "og:image",
94
- "value": [
95
- {
96
- "name": "hario-mini-mill.jpg",
97
- "type": "image/jpeg",
98
- "size": 41478,
99
- "description": "Hario Mini Mill Slim Hand Coffee Grinder",
100
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
101
- }
102
- ]
103
- },
104
- "metadata__twitter_site": {
105
- "type": "text",
106
- "name": "twitter:site",
107
- "value": "Dancing Goat"
108
- },
109
- "metadata__twitter_creator": {
110
- "type": "text",
111
- "name": "twitter:creator",
112
- "value": "@kenticokontent"
113
- },
114
- "metadata__twitter_title": {
115
- "type": "text",
116
- "name": "twitter:title",
117
- "value": "Hario Mini Mill Slim"
118
- },
119
- "metadata__twitter_description": {
120
- "type": "text",
121
- "name": "twitter:description",
122
- "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."
123
- },
124
- "metadata__twitter_image": {
125
- "type": "asset",
126
- "name": "twitter:image",
127
- "value": [
128
- {
129
- "name": "hario-mini-mill.jpg",
130
- "type": "image/jpeg",
131
- "size": 41478,
132
- "description": "Hario Mini Mill Slim Hand Coffee Grinder",
133
- "url": "https://assets-us-01.kc-usercontent.com:443/faf446d2-0544-0039-bb43-5d6ef816661a/0b590263-3fe5-4773-afae-5a3f6e511e66/hario-mini-mill.jpg"
134
- }
135
- ]
136
- }
137
- }
138
- },
139
- {
140
- "system": {
141
- "id": "6a4bbe7b-e6ce-4f79-a006-174708cb91e6",
142
- "name": "Porlex Tall Ceramic Burr Grinder",
143
- "codename": "porlex_tall_ceramic_burr_grinder",
144
- "language": "en-US",
145
- "type": "grinder",
146
- "sitemap_locations": [
147
- "grinders"
148
- ],
149
- "last_modified": "2017-12-08T09:31:24.067Z"
150
- },
151
- "elements": {
152
- "product_name": {
153
- "type": "text",
154
- "name": "Product name",
155
- "value": "Porlex Tall Ceramic Burr Grinder"
156
- },
157
- "price": {
158
- "type": "number",
159
- "name": "Price",
160
- "value": 32.9
161
- },
162
- "image": {
163
- "type": "asset",
164
- "name": "Image",
165
- "value": [
166
- {
167
- "name": "porlex-tall-ceramic-burr-grinder.jpg",
168
- "type": "image/jpeg",
169
- "size": 37996,
170
- "description": "Hand Coffee Grinder",
171
- "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"
172
- }
173
- ]
174
- },
175
- "manufacturer": {
176
- "type": "text",
177
- "name": "Manufacturer",
178
- "value": "Porlex"
179
- },
180
- "product_status": {
181
- "type": "taxonomy",
182
- "name": "Product status",
183
- "taxonomy_group": "product_status",
184
- "value": []
185
- },
186
- "short_description": {
187
- "type": "rich_text",
188
- "name": "Short description",
189
- "images": {},
190
- "links": {},
191
- "modular_content": [],
192
- "value": "<p>An extra-durable grinder with strong conical ceramic burrs&nbsp;that fits perfectly in your hands.</p>"
193
- },
194
- "long_description": {
195
- "type": "rich_text",
196
- "name": "Long description",
197
- "images": {},
198
- "links": {},
199
- "modular_content": [],
200
- "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>"
201
- },
202
- "url_pattern": {
203
- "type": "url_slug",
204
- "name": "URL pattern",
205
- "value": "porlex-tall-ceramic-burr-grinder"
206
- },
207
- "metadata__meta_title": {
208
- "type": "text",
209
- "name": "Meta title",
210
- "value": "Porlex Tall Ceramic Burr Grinder"
211
- },
212
- "metadata__meta_description": {
213
- "type": "text",
214
- "name": "Meta description",
215
- "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
216
- },
217
- "metadata__og_title": {
218
- "type": "text",
219
- "name": "og:title",
220
- "value": "Porlex Tall Ceramic Burr Grinder"
221
- },
222
- "metadata__og_description": {
223
- "type": "text",
224
- "name": "og:description",
225
- "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
226
- },
227
- "metadata__og_image": {
228
- "type": "asset",
229
- "name": "og:image",
230
- "value": [
231
- {
232
- "name": "porlex-tall-ceramic-burr-grinder.jpg",
233
- "type": "image/jpeg",
234
- "size": 37996,
235
- "description": "Hand Coffee Grinder",
236
- "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"
237
- }
238
- ]
239
- },
240
- "metadata__twitter_site": {
241
- "type": "text",
242
- "name": "twitter:site",
243
- "value": "Dancing Goat"
244
- },
245
- "metadata__twitter_creator": {
246
- "type": "text",
247
- "name": "twitter:creator",
248
- "value": "@kenticokontent"
249
- },
250
- "metadata__twitter_title": {
251
- "type": "text",
252
- "name": "twitter:title",
253
- "value": "Porlex Tall Ceramic Burr Grinder"
254
- },
255
- "metadata__twitter_description": {
256
- "type": "text",
257
- "name": "twitter:description",
258
- "value": "An extra-durable grinder with strong conical ceramic burrs that fits perfectly in your hands."
259
- },
260
- "metadata__twitter_image": {
261
- "type": "asset",
262
- "name": "twitter:image",
263
- "value": [
264
- {
265
- "name": "porlex-tall-ceramic-burr-grinder.jpg",
266
- "type": "image/jpeg",
267
- "size": 37996,
268
- "description": "Hand Coffee Grinder",
269
- "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"
270
- }
271
- ]
272
- }
273
- }
274
- }
275
- ],
276
- "modular_content": {},
277
- "pagination": {
278
- "skip": 0,
279
- "limit": 0,
280
- "count": 2,
281
- "next_page": ""
282
- }
283
- }
@@ -1,7 +0,0 @@
1
- module Kentico
2
- module Kontent
3
- module Delivery
4
- VERSION = '2.0.18'.freeze
5
- end
6
- end
7
- end