kontent-delivery-sdk-ruby 2.0.19 → 2.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -21
  3. data/README.md +583 -575
  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 -120
  8. data/lib/delivery/client/delivery_client.rb +176 -176
  9. data/lib/delivery/client/delivery_query.rb +302 -302
  10. data/lib/delivery/client/request_manager.rb +125 -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/pagination.rb +22 -22
  14. data/lib/delivery/models/taxonomy_group.rb +39 -39
  15. data/lib/delivery/query_parameters/filters.rb +201 -158
  16. data/lib/delivery/query_parameters/parameter_base.rb +56 -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 -58
  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 +105 -110
  33. data/lib/delivery/tests/filtering/items_with_count.json +5385 -4986
  34. data/lib/delivery/tests/filtering/{pagination_about_us.json → pagination.json} +761 -646
  35. data/lib/delivery/tests/generic/items.json +5383 -4984
  36. data/lib/delivery/tests/generic/items/about_us.json +276 -227
  37. data/lib/delivery/tests/generic/items/aeropress_filters.json +155 -138
  38. data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +565 -168
  39. data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +517 -621
  40. data/lib/delivery/tests/generic/taxonomies.json +203 -126
  41. data/lib/delivery/tests/generic/types.json +836 -781
  42. data/lib/delivery/tests/generic/types/brewer/elements/product_status.json +5 -5
  43. data/lib/delivery/tests/items_feed/articles_feed_1.json +39 -39
  44. data/lib/delivery/tests/items_feed/articles_feed_2.json +78 -78
  45. data/lib/delivery/tests/items_feed/articles_feed_3.json +104 -104
  46. data/lib/kontent-delivery-sdk-ruby.rb +20 -20
  47. metadata +20 -24
  48. data/lib/delivery/tests/filtering/items_gt.json +0 -566
  49. data/lib/delivery/tests/filtering/multiple.json +0 -283
  50. data/lib/delivery/version.rb +0 -7
@@ -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
+ }