kontent-delivery-sdk-ruby 2.0.22 → 2.0.24

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 +603 -602
  4. data/bin/console +14 -14
  5. data/bin/setup +8 -8
  6. data/lib/delivery/builders/image_transformation_builder.rb +272 -272
  7. data/lib/delivery/builders/url_builder.rb +123 -123
  8. data/lib/delivery/client/delivery_client.rb +184 -184
  9. data/lib/delivery/client/delivery_query.rb +302 -302
  10. data/lib/delivery/client/request_manager.rb +126 -127
  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 -29
  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 -201
  17. data/lib/delivery/query_parameters/parameter_base.rb +56 -56
  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 -44
  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 -105
  35. data/lib/delivery/tests/filtering/items_with_count.json +5384 -5384
  36. data/lib/delivery/tests/filtering/pagination.json +761 -761
  37. data/lib/delivery/tests/generic/items.json +5383 -5383
  38. data/lib/delivery/tests/generic/items/about_us.json +276 -276
  39. data/lib/delivery/tests/generic/items/aeropress_filters.json +155 -155
  40. data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +565 -565
  41. data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +598 -598
  42. data/lib/delivery/tests/generic/languages.json +23 -23
  43. data/lib/delivery/tests/generic/taxonomies.json +203 -203
  44. data/lib/delivery/tests/generic/taxonomies/manufacturer.json +29 -29
  45. data/lib/delivery/tests/generic/types.json +835 -835
  46. data/lib/delivery/tests/generic/types/brewer.json +88 -88
  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 -22
  52. metadata +13 -32
@@ -1,89 +1,89 @@
1
- {
2
- "system": {
3
- "id": "7bc932b3-ce2a-4aa7-954e-04cbcbd214fc",
4
- "name": "Brewer",
5
- "codename": "brewer",
6
- "last_modified": "2019-07-16T07:15:27.5660000Z"
7
- },
8
- "elements": {
9
- "product_name": {
10
- "type": "text",
11
- "name": "Product name"
12
- },
13
- "metadata__og_description": {
14
- "type": "text",
15
- "name": "og:description"
16
- },
17
- "metadata__meta_title": {
18
- "type": "text",
19
- "name": "Meta title"
20
- },
21
- "long_description": {
22
- "type": "rich_text",
23
- "name": "Long description"
24
- },
25
- "metadata__og_title": {
26
- "type": "text",
27
- "name": "og:title"
28
- },
29
- "metadata__meta_description": {
30
- "type": "text",
31
- "name": "Meta description"
32
- },
33
- "metadata__twitter_site": {
34
- "type": "text",
35
- "name": "twitter:site"
36
- },
37
- "price": {
38
- "type": "number",
39
- "name": "Price"
40
- },
41
- "manufacturer": {
42
- "type": "taxonomy",
43
- "name": "Manufacturer",
44
- "taxonomy_group": "manufacturer"
45
- },
46
- "metadata__twitter_image": {
47
- "type": "asset",
48
- "name": "twitter:image"
49
- },
50
- "metadata__twitter_creator": {
51
- "type": "text",
52
- "name": "twitter:creator"
53
- },
54
- "url_pattern": {
55
- "type": "url_slug",
56
- "name": "URL pattern"
57
- },
58
- "sitemap": {
59
- "type": "taxonomy",
60
- "name": "Sitemap",
61
- "taxonomy_group": "sitemap_538125f"
62
- },
63
- "short_description": {
64
- "type": "rich_text",
65
- "name": "Short description"
66
- },
67
- "product_status": {
68
- "type": "taxonomy",
69
- "name": "Product status",
70
- "taxonomy_group": "product_status"
71
- },
72
- "metadata__twitter_title": {
73
- "type": "text",
74
- "name": "twitter:title"
75
- },
76
- "metadata__twitter_description": {
77
- "type": "text",
78
- "name": "twitter:description"
79
- },
80
- "metadata__og_image": {
81
- "type": "asset",
82
- "name": "og:image"
83
- },
84
- "image": {
85
- "type": "asset",
86
- "name": "Image"
87
- }
88
- }
1
+ {
2
+ "system": {
3
+ "id": "7bc932b3-ce2a-4aa7-954e-04cbcbd214fc",
4
+ "name": "Brewer",
5
+ "codename": "brewer",
6
+ "last_modified": "2019-07-16T07:15:27.5660000Z"
7
+ },
8
+ "elements": {
9
+ "product_name": {
10
+ "type": "text",
11
+ "name": "Product name"
12
+ },
13
+ "metadata__og_description": {
14
+ "type": "text",
15
+ "name": "og:description"
16
+ },
17
+ "metadata__meta_title": {
18
+ "type": "text",
19
+ "name": "Meta title"
20
+ },
21
+ "long_description": {
22
+ "type": "rich_text",
23
+ "name": "Long description"
24
+ },
25
+ "metadata__og_title": {
26
+ "type": "text",
27
+ "name": "og:title"
28
+ },
29
+ "metadata__meta_description": {
30
+ "type": "text",
31
+ "name": "Meta description"
32
+ },
33
+ "metadata__twitter_site": {
34
+ "type": "text",
35
+ "name": "twitter:site"
36
+ },
37
+ "price": {
38
+ "type": "number",
39
+ "name": "Price"
40
+ },
41
+ "manufacturer": {
42
+ "type": "taxonomy",
43
+ "name": "Manufacturer",
44
+ "taxonomy_group": "manufacturer"
45
+ },
46
+ "metadata__twitter_image": {
47
+ "type": "asset",
48
+ "name": "twitter:image"
49
+ },
50
+ "metadata__twitter_creator": {
51
+ "type": "text",
52
+ "name": "twitter:creator"
53
+ },
54
+ "url_pattern": {
55
+ "type": "url_slug",
56
+ "name": "URL pattern"
57
+ },
58
+ "sitemap": {
59
+ "type": "taxonomy",
60
+ "name": "Sitemap",
61
+ "taxonomy_group": "sitemap_538125f"
62
+ },
63
+ "short_description": {
64
+ "type": "rich_text",
65
+ "name": "Short description"
66
+ },
67
+ "product_status": {
68
+ "type": "taxonomy",
69
+ "name": "Product status",
70
+ "taxonomy_group": "product_status"
71
+ },
72
+ "metadata__twitter_title": {
73
+ "type": "text",
74
+ "name": "twitter:title"
75
+ },
76
+ "metadata__twitter_description": {
77
+ "type": "text",
78
+ "name": "twitter:description"
79
+ },
80
+ "metadata__og_image": {
81
+ "type": "asset",
82
+ "name": "og:image"
83
+ },
84
+ "image": {
85
+ "type": "asset",
86
+ "name": "Image"
87
+ }
88
+ }
89
89
  }
@@ -1,6 +1,6 @@
1
- {
2
- "type": "taxonomy",
3
- "name": "Product status",
4
- "taxonomy_group": "product_status",
5
- "codename": "product_status"
1
+ {
2
+ "type": "taxonomy",
3
+ "name": "Product status",
4
+ "taxonomy_group": "product_status",
5
+ "codename": "product_status"
6
6
  }
@@ -1,39 +1,39 @@
1
- {
2
- "items": [{
3
- "system": {
4
- "id": "b2fea94c-73fd-42ec-a22f-f409878de187",
5
- "name": "Origins of Arabica Bourbon",
6
- "codename": "origins_of_arabica_bourbon",
7
- "language": "en-US",
8
- "type": "article",
9
- "sitemap_locations": [],
10
- "last_modified": "2019-03-27T13:21:49.151Z"
11
- },
12
- "elements": {
13
- "title": {
14
- "type": "text",
15
- "name": "Title",
16
- "value": "Origins of Arabica Bourbon"
17
- },
18
- "summary": {
19
- "type": "text",
20
- "name": "Summary",
21
- "value": "This one particular type of coffee, the Arabica Bourbon, is now sold only in Japan. It has been brought back to life by enthusiasts after being almost forgotten for nearly sixty years."
22
- },
23
- "personas": {
24
- "type": "taxonomy",
25
- "name": "Personas",
26
- "taxonomy_group": "personas",
27
- "value": [{
28
- "name": "Barista",
29
- "codename": "barista"
30
- }, {
31
- "name": "Coffee blogger",
32
- "codename": "coffee_blogger"
33
- }
34
- ]
35
- }
36
- }
37
- }
38
- ]
39
- }
1
+ {
2
+ "items": [{
3
+ "system": {
4
+ "id": "b2fea94c-73fd-42ec-a22f-f409878de187",
5
+ "name": "Origins of Arabica Bourbon",
6
+ "codename": "origins_of_arabica_bourbon",
7
+ "language": "en-US",
8
+ "type": "article",
9
+ "sitemap_locations": [],
10
+ "last_modified": "2019-03-27T13:21:49.151Z"
11
+ },
12
+ "elements": {
13
+ "title": {
14
+ "type": "text",
15
+ "name": "Title",
16
+ "value": "Origins of Arabica Bourbon"
17
+ },
18
+ "summary": {
19
+ "type": "text",
20
+ "name": "Summary",
21
+ "value": "This one particular type of coffee, the Arabica Bourbon, is now sold only in Japan. It has been brought back to life by enthusiasts after being almost forgotten for nearly sixty years."
22
+ },
23
+ "personas": {
24
+ "type": "taxonomy",
25
+ "name": "Personas",
26
+ "taxonomy_group": "personas",
27
+ "value": [{
28
+ "name": "Barista",
29
+ "codename": "barista"
30
+ }, {
31
+ "name": "Coffee blogger",
32
+ "codename": "coffee_blogger"
33
+ }
34
+ ]
35
+ }
36
+ }
37
+ }
38
+ ]
39
+ }
@@ -1,78 +1,78 @@
1
- {
2
- "items": [{
3
- "system": {
4
- "id": "3120ec15-a4a2-47ec-8ccd-c85ac8ac5ba5",
5
- "name": "Which brewing fits you?",
6
- "codename": "which_brewing_fits_you_",
7
- "language": "en-US",
8
- "type": "article",
9
- "sitemap_locations": [],
10
- "last_modified": "2019-03-27T13:24:54.042Z"
11
- },
12
- "elements": {
13
- "title": {
14
- "type": "text",
15
- "name": "Title",
16
- "value": "Which brewing fits you?"
17
- },
18
- "summary": {
19
- "type": "text",
20
- "name": "Summary",
21
- "value": "We have put down three procedures with clearly written steps describing the process of making coffee. Read this article to convince yourself that brewing coffee is no science"
22
- },
23
- "personas": {
24
- "type": "taxonomy",
25
- "name": "Personas",
26
- "taxonomy_group": "personas",
27
- "value": [{
28
- "name": "Coffee lover",
29
- "codename": "coffee_lover"
30
- }, {
31
- "name": "Coffee blogger",
32
- "codename": "coffee_blogger"
33
- }, {
34
- "name": "Barista",
35
- "codename": "barista"
36
- }
37
- ]
38
- }
39
- }
40
- }, {
41
- "system": {
42
- "id": "f4b3fc05-e988-4dae-9ac1-a94aba566474",
43
- "name": "On Roasts",
44
- "codename": "on_roasts",
45
- "language": "en-US",
46
- "type": "article",
47
- "sitemap_locations": [],
48
- "last_modified": "2019-03-27T13:21:11.38Z"
49
- },
50
- "elements": {
51
- "title": {
52
- "type": "text",
53
- "name": "Title",
54
- "value": "On Roasts"
55
- },
56
- "summary": {
57
- "type": "text",
58
- "name": "Summary",
59
- "value": "Roasting coffee beans can take from 6 to 13 minutes. Different roasting times produce different types of coffee, with varying concentration of caffeine and intensity of the original flavor."
60
- },
61
- "personas": {
62
- "type": "taxonomy",
63
- "name": "Personas",
64
- "taxonomy_group": "personas",
65
- "value": [{
66
- "name": "Barista",
67
- "codename": "barista"
68
- }, {
69
- "name": "Coffee blogger",
70
- "codename": "coffee_blogger"
71
- }
72
- ]
73
- }
74
- }
75
- }
76
- ],
77
- "modular_content": {}
78
- }
1
+ {
2
+ "items": [{
3
+ "system": {
4
+ "id": "3120ec15-a4a2-47ec-8ccd-c85ac8ac5ba5",
5
+ "name": "Which brewing fits you?",
6
+ "codename": "which_brewing_fits_you_",
7
+ "language": "en-US",
8
+ "type": "article",
9
+ "sitemap_locations": [],
10
+ "last_modified": "2019-03-27T13:24:54.042Z"
11
+ },
12
+ "elements": {
13
+ "title": {
14
+ "type": "text",
15
+ "name": "Title",
16
+ "value": "Which brewing fits you?"
17
+ },
18
+ "summary": {
19
+ "type": "text",
20
+ "name": "Summary",
21
+ "value": "We have put down three procedures with clearly written steps describing the process of making coffee. Read this article to convince yourself that brewing coffee is no science"
22
+ },
23
+ "personas": {
24
+ "type": "taxonomy",
25
+ "name": "Personas",
26
+ "taxonomy_group": "personas",
27
+ "value": [{
28
+ "name": "Coffee lover",
29
+ "codename": "coffee_lover"
30
+ }, {
31
+ "name": "Coffee blogger",
32
+ "codename": "coffee_blogger"
33
+ }, {
34
+ "name": "Barista",
35
+ "codename": "barista"
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ }, {
41
+ "system": {
42
+ "id": "f4b3fc05-e988-4dae-9ac1-a94aba566474",
43
+ "name": "On Roasts",
44
+ "codename": "on_roasts",
45
+ "language": "en-US",
46
+ "type": "article",
47
+ "sitemap_locations": [],
48
+ "last_modified": "2019-03-27T13:21:11.38Z"
49
+ },
50
+ "elements": {
51
+ "title": {
52
+ "type": "text",
53
+ "name": "Title",
54
+ "value": "On Roasts"
55
+ },
56
+ "summary": {
57
+ "type": "text",
58
+ "name": "Summary",
59
+ "value": "Roasting coffee beans can take from 6 to 13 minutes. Different roasting times produce different types of coffee, with varying concentration of caffeine and intensity of the original flavor."
60
+ },
61
+ "personas": {
62
+ "type": "taxonomy",
63
+ "name": "Personas",
64
+ "taxonomy_group": "personas",
65
+ "value": [{
66
+ "name": "Barista",
67
+ "codename": "barista"
68
+ }, {
69
+ "name": "Coffee blogger",
70
+ "codename": "coffee_blogger"
71
+ }
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ ],
77
+ "modular_content": {}
78
+ }
@@ -1,104 +1,104 @@
1
- {
2
- "items": [{
3
- "system": {
4
- "id": "cf106f4e-30a4-42ef-b313-b8ea3fd3e5c5",
5
- "name": "Coffee Beverages Explained",
6
- "codename": "coffee_beverages_explained",
7
- "language": "en-US",
8
- "type": "article",
9
- "sitemap_locations": [],
10
- "last_modified": "2019-03-27T13:12:58.578Z"
11
- },
12
- "elements": {
13
- "title": {
14
- "type": "text",
15
- "name": "Title",
16
- "value": "Coffee Beverages Explained"
17
- },
18
- "summary": {
19
- "type": "text",
20
- "name": "Summary",
21
- "value": "Espresso and filtered coffee are the two main categories of coffee, based on the method of preparation. Learn about individual types of coffee that fall under these categories."
22
- },
23
- "personas": {
24
- "type": "taxonomy",
25
- "name": "Personas",
26
- "taxonomy_group": "personas",
27
- "value": [{
28
- "name": "Coffee lover",
29
- "codename": "coffee_lover"
30
- }
31
- ]
32
- }
33
- }
34
- }, {
35
- "system": {
36
- "id": "117cdfae-52cf-4885-b271-66aef6825612",
37
- "name": "Coffee processing techniques",
38
- "codename": "coffee_processing_techniques",
39
- "language": "en-US",
40
- "type": "article",
41
- "sitemap_locations": [],
42
- "last_modified": "2019-03-27T13:13:35.312Z"
43
- },
44
- "elements": {
45
- "title": {
46
- "type": "text",
47
- "name": "Title",
48
- "value": "Coffee processing techniques"
49
- },
50
- "summary": {
51
- "type": "text",
52
- "name": "Summary",
53
- "value": "Learn about the techniques of processing the products of coffee plants. Different methods are used in different parts of the world depending mainly on their weather conditions."
54
- },
55
- "personas": {
56
- "type": "taxonomy",
57
- "name": "Personas",
58
- "taxonomy_group": "personas",
59
- "value": [{
60
- "name": "Coffee blogger",
61
- "codename": "coffee_blogger"
62
- }, {
63
- "name": "Coffee lover",
64
- "codename": "coffee_lover"
65
- }
66
- ]
67
- }
68
- }
69
- }, {
70
- "system": {
71
- "id": "23f71096-fa89-4f59-a3f9-970e970944ec",
72
- "name": "Donate with us",
73
- "codename": "donate_with_us",
74
- "language": "en-US",
75
- "type": "article",
76
- "sitemap_locations": [],
77
- "last_modified": "2019-03-27T13:14:07.384Z"
78
- },
79
- "elements": {
80
- "title": {
81
- "type": "text",
82
- "name": "Title",
83
- "value": "Donate with us"
84
- },
85
- "summary": {
86
- "type": "text",
87
- "name": "Summary",
88
- "value": "Dancing Goat regularly donates money to Children in Africa, a foundation helping children with food, accommodation, education, and other essentials. Donate with us and create a better world."
89
- },
90
- "personas": {
91
- "type": "taxonomy",
92
- "name": "Personas",
93
- "taxonomy_group": "personas",
94
- "value": [{
95
- "name": "Cafe owner",
96
- "codename": "cafe_owner"
97
- }
98
- ]
99
- }
100
- }
101
- }
102
- ],
103
- "modular_content": {}
104
- }
1
+ {
2
+ "items": [{
3
+ "system": {
4
+ "id": "cf106f4e-30a4-42ef-b313-b8ea3fd3e5c5",
5
+ "name": "Coffee Beverages Explained",
6
+ "codename": "coffee_beverages_explained",
7
+ "language": "en-US",
8
+ "type": "article",
9
+ "sitemap_locations": [],
10
+ "last_modified": "2019-03-27T13:12:58.578Z"
11
+ },
12
+ "elements": {
13
+ "title": {
14
+ "type": "text",
15
+ "name": "Title",
16
+ "value": "Coffee Beverages Explained"
17
+ },
18
+ "summary": {
19
+ "type": "text",
20
+ "name": "Summary",
21
+ "value": "Espresso and filtered coffee are the two main categories of coffee, based on the method of preparation. Learn about individual types of coffee that fall under these categories."
22
+ },
23
+ "personas": {
24
+ "type": "taxonomy",
25
+ "name": "Personas",
26
+ "taxonomy_group": "personas",
27
+ "value": [{
28
+ "name": "Coffee lover",
29
+ "codename": "coffee_lover"
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ }, {
35
+ "system": {
36
+ "id": "117cdfae-52cf-4885-b271-66aef6825612",
37
+ "name": "Coffee processing techniques",
38
+ "codename": "coffee_processing_techniques",
39
+ "language": "en-US",
40
+ "type": "article",
41
+ "sitemap_locations": [],
42
+ "last_modified": "2019-03-27T13:13:35.312Z"
43
+ },
44
+ "elements": {
45
+ "title": {
46
+ "type": "text",
47
+ "name": "Title",
48
+ "value": "Coffee processing techniques"
49
+ },
50
+ "summary": {
51
+ "type": "text",
52
+ "name": "Summary",
53
+ "value": "Learn about the techniques of processing the products of coffee plants. Different methods are used in different parts of the world depending mainly on their weather conditions."
54
+ },
55
+ "personas": {
56
+ "type": "taxonomy",
57
+ "name": "Personas",
58
+ "taxonomy_group": "personas",
59
+ "value": [{
60
+ "name": "Coffee blogger",
61
+ "codename": "coffee_blogger"
62
+ }, {
63
+ "name": "Coffee lover",
64
+ "codename": "coffee_lover"
65
+ }
66
+ ]
67
+ }
68
+ }
69
+ }, {
70
+ "system": {
71
+ "id": "23f71096-fa89-4f59-a3f9-970e970944ec",
72
+ "name": "Donate with us",
73
+ "codename": "donate_with_us",
74
+ "language": "en-US",
75
+ "type": "article",
76
+ "sitemap_locations": [],
77
+ "last_modified": "2019-03-27T13:14:07.384Z"
78
+ },
79
+ "elements": {
80
+ "title": {
81
+ "type": "text",
82
+ "name": "Title",
83
+ "value": "Donate with us"
84
+ },
85
+ "summary": {
86
+ "type": "text",
87
+ "name": "Summary",
88
+ "value": "Dancing Goat regularly donates money to Children in Africa, a foundation helping children with food, accommodation, education, and other essentials. Donate with us and create a better world."
89
+ },
90
+ "personas": {
91
+ "type": "taxonomy",
92
+ "name": "Personas",
93
+ "taxonomy_group": "personas",
94
+ "value": [{
95
+ "name": "Cafe owner",
96
+ "codename": "cafe_owner"
97
+ }
98
+ ]
99
+ }
100
+ }
101
+ }
102
+ ],
103
+ "modular_content": {}
104
+ }