kontent-delivery-sdk-ruby 2.0.6 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.md +21 -21
  3. data/README.md +511 -511
  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 +117 -117
  8. data/lib/delivery/client/delivery_client.rb +155 -155
  9. data/lib/delivery/client/delivery_query.rb +249 -249
  10. data/lib/delivery/client/request_manager.rb +107 -107
  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 +21 -21
  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 +44 -44
  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 +33 -33
  22. data/lib/delivery/responses/delivery_item_listing_response.rb +53 -53
  23. data/lib/delivery/responses/delivery_item_response.rb +39 -39
  24. data/lib/delivery/responses/delivery_taxonomy_listing_response.rb +46 -46
  25. data/lib/delivery/responses/delivery_taxonomy_response.rb +32 -32
  26. data/lib/delivery/responses/delivery_type_listing_response.rb +45 -45
  27. data/lib/delivery/responses/delivery_type_response.rb +31 -31
  28. data/lib/delivery/responses/response_base.rb +36 -36
  29. data/lib/delivery/tests/401.json +5 -5
  30. data/lib/delivery/tests/fake_responder.rb +67 -67
  31. data/lib/delivery/tests/filtering/items_gt.json +565 -565
  32. data/lib/delivery/tests/filtering/multiple.json +282 -282
  33. data/lib/delivery/tests/filtering/pagination_about_us.json +646 -646
  34. data/lib/delivery/tests/generic/items/about_us.json +227 -227
  35. data/lib/delivery/tests/generic/items/aeropress_filters.json +138 -138
  36. data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +168 -168
  37. data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +620 -620
  38. data/lib/delivery/tests/generic/items.json +4984 -4984
  39. data/lib/delivery/tests/generic/taxonomies.json +126 -126
  40. data/lib/delivery/tests/generic/types/brewer/elements/product_status.json +5 -5
  41. data/lib/delivery/tests/generic/types.json +780 -780
  42. data/lib/delivery/version.rb +7 -7
  43. data/lib/kontent-delivery-sdk-ruby.rb +19 -19
  44. metadata +12 -13
@@ -1,102 +1,102 @@
1
- require 'nokogiri'
2
-
3
- module Kentico
4
- module Kontent
5
- module Delivery
6
- module Resolvers
7
- # Locates <a data-item-id=""> tags in content and calls a user-defined method
8
- # to supply the href for content item links.
9
- # See https://github.com/Kentico/kontent-delivery-sdk-ruby#resolving-links
10
- class ContentLinkResolver
11
- # Constructor.
12
- #
13
- # * *Args*:
14
- # - *found_handler* (+lambda+) _optional_ Method to be called when resolving a content link and the content item is present in the response
15
- # - *not_found_handler* (+lambda+) _optional_ Method to be called when resolving a content link and the content item isn't present in the response
16
- def initialize(found_handler = nil, not_found_handler = nil)
17
- @found_handler = found_handler
18
- @not_found = not_found_handler
19
- end
20
-
21
- # Resolves all links in the content.
22
- #
23
- # * *Args*:
24
- # - *content* (+string+) The string value stored in the element
25
- # - *links* (+Array+) The collection of links from an element's 'links' JSON node
26
- #
27
- # * *Returns*:
28
- # - +string+ The original content passed, with all links resolved
29
- def resolve(content, links)
30
- doc = Nokogiri::HTML.parse(content).xpath('//body')
31
- links = links.map { |link| ContentLink.new link }
32
- tags = doc.xpath('//a[@data-item-id]')
33
- # This line performs the link resolving and replaces the tags in doc
34
- tags.map { |tag| resolve_tag tag, links }
35
- doc.to_xhtml
36
- end
37
-
38
- private
39
-
40
- # Accepts a tag found in the content and tries to locate matching
41
- # source link from JSON response. If found, resolves URL and returns
42
- # the tag with generated HREF.
43
- #
44
- # * *Args*:
45
- # - *tag* (+string+) A <a data-item-id=""> tag found in the content
46
- # - *links* (+Array+) The collection of links from an element's 'links' JSON node, converted to Kentico::Kontent::Delivery::Resolvers::ContentLink objects
47
- #
48
- # * *Returns*:
49
- # - +string+ The <a data-item-id=""> tag with an HREF generated by the +provide_url+ method
50
- def resolve_tag(tag, links)
51
- matches = links.select { |link| link.id == tag['data-item-id'].to_s }
52
- url = provide_url matches, tag['data-item-id']
53
- tag['href'] = url
54
- tag
55
- end
56
-
57
- # Uses the +resolve_link+ method to generate a URL for a ContentLink
58
- # object, or +resolve_404+ if the content item was not present in the
59
- # response.
60
- #
61
- # * *Args*:
62
- # - *matches* (+Array+) The ContentLink objects with an ID matching a particular <a data-item-id=""> tag
63
- # - *id* (+string+) The ID of the <a data-item-id=""> tag being resolved
64
- #
65
- # * *Returns*:
66
- # - +string+ A url to the item or 404 page
67
- def provide_url(matches, id)
68
- if matches.empty?
69
- if @not_found_handler.nil?
70
- resolve_404 id
71
- else
72
- @not_found_handler.call id
73
- end
74
- else
75
- if @found_handler.nil?
76
- resolve_link matches[0]
77
- else
78
- @found_handler.call matches[0]
79
- end
80
- end
81
- end
82
- end
83
-
84
- # Model for links from the JSON response
85
- class ContentLink
86
- attr_accessor :code_name, :type, :url_slug, :id
87
-
88
- # Constructor.
89
- #
90
- # * *Args*:
91
- # - *link* (+JSON+) One link from an element's 'links' JSON node
92
- def initialize(link)
93
- self.id = link[0]
94
- self.code_name = link[1]['codename']
95
- self.type = link[1]['type']
96
- self.url_slug = link[1]['url_slug']
97
- end
98
- end
99
- end
100
- end
101
- end
102
- end
1
+ require 'nokogiri'
2
+
3
+ module Kentico
4
+ module Kontent
5
+ module Delivery
6
+ module Resolvers
7
+ # Locates <a data-item-id=""> tags in content and calls a user-defined method
8
+ # to supply the href for content item links.
9
+ # See https://github.com/Kentico/kontent-delivery-sdk-ruby#resolving-links
10
+ class ContentLinkResolver
11
+ # Constructor.
12
+ #
13
+ # * *Args*:
14
+ # - *found_handler* (+lambda+) _optional_ Method to be called when resolving a content link and the content item is present in the response
15
+ # - *not_found_handler* (+lambda+) _optional_ Method to be called when resolving a content link and the content item isn't present in the response
16
+ def initialize(found_handler = nil, not_found_handler = nil)
17
+ @found_handler = found_handler
18
+ @not_found = not_found_handler
19
+ end
20
+
21
+ # Resolves all links in the content.
22
+ #
23
+ # * *Args*:
24
+ # - *content* (+string+) The string value stored in the element
25
+ # - *links* (+Array+) The collection of links from an element's 'links' JSON node
26
+ #
27
+ # * *Returns*:
28
+ # - +string+ The original content passed, with all links resolved
29
+ def resolve(content, links)
30
+ doc = Nokogiri::HTML.parse(content).xpath('//body')
31
+ links = links.map { |link| ContentLink.new link }
32
+ tags = doc.xpath('//a[@data-item-id]')
33
+ # This line performs the link resolving and replaces the tags in doc
34
+ tags.map { |tag| resolve_tag tag, links }
35
+ doc.to_xhtml
36
+ end
37
+
38
+ private
39
+
40
+ # Accepts a tag found in the content and tries to locate matching
41
+ # source link from JSON response. If found, resolves URL and returns
42
+ # the tag with generated HREF.
43
+ #
44
+ # * *Args*:
45
+ # - *tag* (+string+) A <a data-item-id=""> tag found in the content
46
+ # - *links* (+Array+) The collection of links from an element's 'links' JSON node, converted to Kentico::Kontent::Delivery::Resolvers::ContentLink objects
47
+ #
48
+ # * *Returns*:
49
+ # - +string+ The <a data-item-id=""> tag with an HREF generated by the +provide_url+ method
50
+ def resolve_tag(tag, links)
51
+ matches = links.select { |link| link.id == tag['data-item-id'].to_s }
52
+ url = provide_url matches, tag['data-item-id']
53
+ tag['href'] = url
54
+ tag
55
+ end
56
+
57
+ # Uses the +resolve_link+ method to generate a URL for a ContentLink
58
+ # object, or +resolve_404+ if the content item was not present in the
59
+ # response.
60
+ #
61
+ # * *Args*:
62
+ # - *matches* (+Array+) The ContentLink objects with an ID matching a particular <a data-item-id=""> tag
63
+ # - *id* (+string+) The ID of the <a data-item-id=""> tag being resolved
64
+ #
65
+ # * *Returns*:
66
+ # - +string+ A url to the item or 404 page
67
+ def provide_url(matches, id)
68
+ if matches.empty?
69
+ if @not_found_handler.nil?
70
+ resolve_404 id
71
+ else
72
+ @not_found_handler.call id
73
+ end
74
+ else
75
+ if @found_handler.nil?
76
+ resolve_link matches[0]
77
+ else
78
+ @found_handler.call matches[0]
79
+ end
80
+ end
81
+ end
82
+ end
83
+
84
+ # Model for links from the JSON response
85
+ class ContentLink
86
+ attr_accessor :code_name, :type, :url_slug, :id
87
+
88
+ # Constructor.
89
+ #
90
+ # * *Args*:
91
+ # - *link* (+JSON+) One link from an element's 'links' JSON node
92
+ def initialize(link)
93
+ self.id = link[0]
94
+ self.code_name = link[1]['codename']
95
+ self.type = link[1]['type']
96
+ self.url_slug = link[1]['url_slug']
97
+ end
98
+ end
99
+ end
100
+ end
101
+ end
102
+ end
@@ -1,75 +1,75 @@
1
- require 'nokogiri'
2
-
3
- module Kentico
4
- module Kontent
5
- module Delivery
6
- module Resolvers
7
- # Locates <object data-type="item"> tags in content and calls a user-defined
8
- # method to supply the output for the content item.
9
- # See https://github.com/Kentico/kontent-delivery-sdk-ruby#resolving-inline-content
10
- class InlineContentItemResolver
11
- def initialize(callback = nil)
12
- @callback = callback
13
- end
14
-
15
- # Resolves all inline content items in the content.
16
- #
17
- # * *Args*:
18
- # - *content* (+string+) The string value stored in the element
19
- # - *inline_items* (+Array+) ContentItems referenced by the content from the 'modular_content' JSON node
20
- #
21
- # * *Returns*:
22
- # - +string+ The original content passed, with all <object data-type="item"> replaced with custom output
23
- def resolve(content, inline_items)
24
- doc = Nokogiri::HTML.parse(content).xpath('//body')
25
- tags = doc.xpath('//object[@type="application/kenticocloud"][@data-type="item"]')
26
- tags.each do |tag|
27
- output = resolve_tag tag, inline_items
28
- el = doc.at_xpath(
29
- '//object[@type="application/kenticocloud"][@data-type="item"][@data-codename=$value]',
30
- nil,
31
- value: tag['data-codename']
32
- )
33
- el.swap(output) unless output.nil?
34
- end
35
- doc.inner_html
36
- end
37
-
38
- private
39
-
40
- # Accepts a tag found in the content and tries to locate matching
41
- # ContentItem from JSON response.
42
- #
43
- # * *Args*:
44
- # - *tag* (+string+) A <object data-type="item"> tag found in the content
45
- # - *inline_items* (+Array+) ContentItems referenced by the content from the 'modular_content' JSON node
46
- #
47
- # * *Returns*:
48
- # - +string+ The custom output generated by the +provide_output+ method
49
- def resolve_tag(tag, inline_items)
50
- matches = inline_items.select { |item| item.system.codename == tag['data-codename'].to_s }
51
- provide_output matches
52
- end
53
-
54
- # Generates custom output for a content item using the +resolve_item+
55
- # method.
56
- #
57
- # * *Args*:
58
- # - *matches* (+Array+) The ContentItems from the 'modular_content' JSON node which match the code name of a particular <object data-type="item"> tag
59
- #
60
- # * *Returns*:
61
- # - +string+ The custom output generated by the +resolve_item+ method
62
- def provide_output(matches)
63
- if !matches.empty?
64
- if @callback.nil?
65
- resolve_item matches[0]
66
- else
67
- @callback.call matches[0]
68
- end
69
- end
70
- end
71
- end
72
- end
73
- end
74
- end
75
- end
1
+ require 'nokogiri'
2
+
3
+ module Kentico
4
+ module Kontent
5
+ module Delivery
6
+ module Resolvers
7
+ # Locates <object data-type="item"> tags in content and calls a user-defined
8
+ # method to supply the output for the content item.
9
+ # See https://github.com/Kentico/kontent-delivery-sdk-ruby#resolving-inline-content
10
+ class InlineContentItemResolver
11
+ def initialize(callback = nil)
12
+ @callback = callback
13
+ end
14
+
15
+ # Resolves all inline content items in the content.
16
+ #
17
+ # * *Args*:
18
+ # - *content* (+string+) The string value stored in the element
19
+ # - *inline_items* (+Array+) ContentItems referenced by the content from the 'modular_content' JSON node
20
+ #
21
+ # * *Returns*:
22
+ # - +string+ The original content passed, with all <object data-type="item"> replaced with custom output
23
+ def resolve(content, inline_items)
24
+ doc = Nokogiri::HTML.parse(content).xpath('//body')
25
+ tags = doc.xpath('//object[@type="application/kenticocloud"][@data-type="item"]')
26
+ tags.each do |tag|
27
+ output = resolve_tag tag, inline_items
28
+ el = doc.at_xpath(
29
+ '//object[@type="application/kenticocloud"][@data-type="item"][@data-codename=$value]',
30
+ nil,
31
+ value: tag['data-codename']
32
+ )
33
+ el.swap(output) unless output.nil?
34
+ end
35
+ doc.inner_html
36
+ end
37
+
38
+ private
39
+
40
+ # Accepts a tag found in the content and tries to locate matching
41
+ # ContentItem from JSON response.
42
+ #
43
+ # * *Args*:
44
+ # - *tag* (+string+) A <object data-type="item"> tag found in the content
45
+ # - *inline_items* (+Array+) ContentItems referenced by the content from the 'modular_content' JSON node
46
+ #
47
+ # * *Returns*:
48
+ # - +string+ The custom output generated by the +provide_output+ method
49
+ def resolve_tag(tag, inline_items)
50
+ matches = inline_items.select { |item| item.system.codename == tag['data-codename'].to_s }
51
+ provide_output matches
52
+ end
53
+
54
+ # Generates custom output for a content item using the +resolve_item+
55
+ # method.
56
+ #
57
+ # * *Args*:
58
+ # - *matches* (+Array+) The ContentItems from the 'modular_content' JSON node which match the code name of a particular <object data-type="item"> tag
59
+ #
60
+ # * *Returns*:
61
+ # - +string+ The custom output generated by the +resolve_item+ method
62
+ def provide_output(matches)
63
+ if !matches.empty?
64
+ if @callback.nil?
65
+ resolve_item matches[0]
66
+ else
67
+ @callback.call matches[0]
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
75
+ end
@@ -1,37 +1,37 @@
1
- module Kentico
2
- module Kontent
3
- module Delivery
4
- module Resolvers
5
- # Resolves a content item by its codename. It contains the modular content
6
- # of item/items response.
7
- class LinkedItemResolver
8
- def initialize(modular_content, content_link_url_resolver, inline_content_item_resolver)
9
- @modular_content = modular_content
10
- @content_link_url_resolver = content_link_url_resolver
11
- @inline_content_item_resolver = inline_content_item_resolver
12
- @resolved_items = {}
13
- end
14
-
15
- # Resolves a content item. If the link for a codename was resolved
16
- # before, it returns the same instance of ContentItem.
17
- #
18
- # * *Args*:
19
- # - *codename* (+string+) Codename of the content item
20
- #
21
- # * *Return*:
22
- # - Kentico::Kontent::Delivery::ContentItem
23
- def resolve(codename)
24
- @resolved_items[codename] ||= resolve_item(codename)
25
- end
26
-
27
- private
28
-
29
- def resolve_item(codename)
30
- item = @modular_content.values.find { |i| i['system']['codename'] == codename }
31
- ContentItem.new JSON.parse(JSON.generate(item)), @content_link_url_resolver, @inline_content_item_resolver, self
32
- end
33
- end
34
- end
35
- end
36
- end
37
- end
1
+ module Kentico
2
+ module Kontent
3
+ module Delivery
4
+ module Resolvers
5
+ # Resolves a content item by its codename. It contains the modular content
6
+ # of item/items response.
7
+ class LinkedItemResolver
8
+ def initialize(modular_content, content_link_url_resolver, inline_content_item_resolver)
9
+ @modular_content = modular_content
10
+ @content_link_url_resolver = content_link_url_resolver
11
+ @inline_content_item_resolver = inline_content_item_resolver
12
+ @resolved_items = {}
13
+ end
14
+
15
+ # Resolves a content item. If the link for a codename was resolved
16
+ # before, it returns the same instance of ContentItem.
17
+ #
18
+ # * *Args*:
19
+ # - *codename* (+string+) Codename of the content item
20
+ #
21
+ # * *Return*:
22
+ # - Kentico::Kontent::Delivery::ContentItem
23
+ def resolve(codename)
24
+ @resolved_items[codename] ||= resolve_item(codename)
25
+ end
26
+
27
+ private
28
+
29
+ def resolve_item(codename)
30
+ item = @modular_content.values.find { |i| i['system']['codename'] == codename }
31
+ ContentItem.new JSON.parse(JSON.generate(item)), @content_link_url_resolver, @inline_content_item_resolver, self
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,33 +1,33 @@
1
- require 'delivery/responses/response_base'
2
-
3
- module Kentico
4
- module Kontent
5
- module Delivery
6
- module Responses
7
- # The response of a successful query of a content type's element
8
- # See https://github.com/Kentico/kontent-delivery-sdk-ruby#retrieving-content-type-elements
9
- class DeliveryElementResponse < ResponseBase
10
- # An element's definition from a
11
- # Kentico::Kontent::Delivery::DeliveryClient.element call
12
- #
13
- # * *Returns*:
14
- # - +OpenStruct+ The element of a content item
15
- def element
16
- @element unless @element.nil?
17
- @element = JSON.parse(
18
- JSON.generate(@response),
19
- object_class: OpenStruct
20
- )
21
- end
22
-
23
- def initialize(response)
24
- @response = response
25
- super 200,
26
- "Success, '#{element.codename}' returned",
27
- JSON.generate(@response)
28
- end
29
- end
30
- end
31
- end
32
- end
33
- end
1
+ require 'delivery/responses/response_base'
2
+
3
+ module Kentico
4
+ module Kontent
5
+ module Delivery
6
+ module Responses
7
+ # The response of a successful query of a content type's element
8
+ # See https://github.com/Kentico/kontent-delivery-sdk-ruby#retrieving-content-type-elements
9
+ class DeliveryElementResponse < ResponseBase
10
+ # An element's definition from a
11
+ # Kentico::Kontent::Delivery::DeliveryClient.element call
12
+ #
13
+ # * *Returns*:
14
+ # - +OpenStruct+ The element of a content item
15
+ def element
16
+ @element unless @element.nil?
17
+ @element = JSON.parse(
18
+ JSON.generate(@response),
19
+ object_class: OpenStruct
20
+ )
21
+ end
22
+
23
+ def initialize(response)
24
+ @response = response
25
+ super 200,
26
+ "Success, '#{element.codename}' returned",
27
+ JSON.generate(@response)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,53 +1,53 @@
1
- require 'delivery/models/content_item'
2
- require 'delivery/models/pagination'
3
- require 'delivery/responses/response_base'
4
-
5
- module Kentico
6
- module Kontent
7
- module Delivery
8
- module Responses
9
- # The response of a successful query for content items.
10
- # See https://github.com/Kentico/kontent-delivery-sdk-ruby#listing-items
11
- class DeliveryItemListingResponse < ResponseBase
12
- # Parses the 'pagination' JSON node of the response.
13
- #
14
- # * *Returns*:
15
- # - Kentico::Kontent::Delivery::Pagination
16
- def pagination
17
- @pagination unless @pagination.nil?
18
- @pagination = Pagination.new @response['pagination']
19
- end
20
-
21
- # A collection of Kentico::Kontent::Delivery::ContentItem objects from
22
- # a Kentico::Kontent::Delivery::DeliveryClient.items call.
23
- #
24
- # * *Returns*:
25
- # - +Array+ One or more Kentico::Kontent::Delivery::ContentItem objects
26
- def items
27
- @items unless @items.nil?
28
- linked_items_resolver = Kentico::Kontent::Delivery::Resolvers::LinkedItemResolver.new @response['modular_content'], @content_link_url_resolver, @inline_content_item_resolver
29
- items = []
30
- @response['items'].each do |n|
31
- items << Kentico::Kontent::Delivery::ContentItem.new(
32
- n,
33
- @content_link_url_resolver,
34
- @inline_content_item_resolver,
35
- linked_items_resolver
36
- )
37
- end
38
- @items = items
39
- end
40
-
41
- def initialize(response, content_link_url_resolver, inline_content_item_resolver)
42
- @response = response
43
- @content_link_url_resolver = content_link_url_resolver
44
- @inline_content_item_resolver = inline_content_item_resolver
45
- super 200,
46
- "Success, #{items.length} items returned",
47
- JSON.generate(@response)
48
- end
49
- end
50
- end
51
- end
52
- end
53
- end
1
+ require 'delivery/models/content_item'
2
+ require 'delivery/models/pagination'
3
+ require 'delivery/responses/response_base'
4
+
5
+ module Kentico
6
+ module Kontent
7
+ module Delivery
8
+ module Responses
9
+ # The response of a successful query for content items.
10
+ # See https://github.com/Kentico/kontent-delivery-sdk-ruby#listing-items
11
+ class DeliveryItemListingResponse < ResponseBase
12
+ # Parses the 'pagination' JSON node of the response.
13
+ #
14
+ # * *Returns*:
15
+ # - Kentico::Kontent::Delivery::Pagination
16
+ def pagination
17
+ @pagination unless @pagination.nil?
18
+ @pagination = Pagination.new @response['pagination']
19
+ end
20
+
21
+ # A collection of Kentico::Kontent::Delivery::ContentItem objects from
22
+ # a Kentico::Kontent::Delivery::DeliveryClient.items call.
23
+ #
24
+ # * *Returns*:
25
+ # - +Array+ One or more Kentico::Kontent::Delivery::ContentItem objects
26
+ def items
27
+ @items unless @items.nil?
28
+ linked_items_resolver = Kentico::Kontent::Delivery::Resolvers::LinkedItemResolver.new @response['modular_content'], @content_link_url_resolver, @inline_content_item_resolver
29
+ items = []
30
+ @response['items'].each do |n|
31
+ items << Kentico::Kontent::Delivery::ContentItem.new(
32
+ n,
33
+ @content_link_url_resolver,
34
+ @inline_content_item_resolver,
35
+ linked_items_resolver
36
+ )
37
+ end
38
+ @items = items
39
+ end
40
+
41
+ def initialize(response, content_link_url_resolver, inline_content_item_resolver)
42
+ @response = response
43
+ @content_link_url_resolver = content_link_url_resolver
44
+ @inline_content_item_resolver = inline_content_item_resolver
45
+ super 200,
46
+ "Success, #{items.length} items returned",
47
+ JSON.generate(@response)
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end