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.
- checksums.yaml +4 -4
- data/LICENSE.md +21 -21
- data/README.md +583 -575
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/lib/delivery/builders/image_transformation_builder.rb +271 -271
- data/lib/delivery/builders/url_builder.rb +120 -120
- data/lib/delivery/client/delivery_client.rb +176 -176
- data/lib/delivery/client/delivery_query.rb +302 -302
- data/lib/delivery/client/request_manager.rb +125 -125
- data/lib/delivery/models/content_item.rb +153 -153
- data/lib/delivery/models/content_type.rb +41 -41
- data/lib/delivery/models/pagination.rb +22 -22
- data/lib/delivery/models/taxonomy_group.rb +39 -39
- data/lib/delivery/query_parameters/filters.rb +201 -158
- data/lib/delivery/query_parameters/parameter_base.rb +56 -46
- data/lib/delivery/query_parameters/query_string.rb +78 -78
- data/lib/delivery/resolvers/content_link_resolver.rb +102 -102
- data/lib/delivery/resolvers/inline_content_item_resolver.rb +75 -75
- data/lib/delivery/resolvers/linked_item_resolver.rb +37 -37
- data/lib/delivery/responses/delivery_element_response.rb +34 -34
- data/lib/delivery/responses/delivery_item_listing_response.rb +54 -54
- data/lib/delivery/responses/delivery_item_response.rb +40 -40
- data/lib/delivery/responses/delivery_items_feed_response.rb +58 -58
- data/lib/delivery/responses/delivery_taxonomy_listing_response.rb +47 -47
- data/lib/delivery/responses/delivery_taxonomy_response.rb +33 -33
- data/lib/delivery/responses/delivery_type_listing_response.rb +46 -46
- data/lib/delivery/responses/delivery_type_response.rb +32 -32
- data/lib/delivery/responses/response_base.rb +39 -39
- data/lib/delivery/tests/401.json +5 -5
- data/lib/delivery/tests/429.json +4 -4
- data/lib/delivery/tests/fake_responder.rb +105 -110
- data/lib/delivery/tests/filtering/items_with_count.json +5385 -4986
- data/lib/delivery/tests/filtering/{pagination_about_us.json → pagination.json} +761 -646
- data/lib/delivery/tests/generic/items.json +5383 -4984
- data/lib/delivery/tests/generic/items/about_us.json +276 -227
- data/lib/delivery/tests/generic/items/aeropress_filters.json +155 -138
- data/lib/delivery/tests/generic/items/coffee_processing_techniques.json +565 -168
- data/lib/delivery/tests/generic/items/where_does_coffee_come_from_.json +517 -621
- data/lib/delivery/tests/generic/taxonomies.json +203 -126
- data/lib/delivery/tests/generic/types.json +836 -781
- data/lib/delivery/tests/generic/types/brewer/elements/product_status.json +5 -5
- data/lib/delivery/tests/items_feed/articles_feed_1.json +39 -39
- data/lib/delivery/tests/items_feed/articles_feed_2.json +78 -78
- data/lib/delivery/tests/items_feed/articles_feed_3.json +104 -104
- data/lib/kontent-delivery-sdk-ruby.rb +20 -20
- metadata +20 -24
- data/lib/delivery/tests/filtering/items_gt.json +0 -566
- data/lib/delivery/tests/filtering/multiple.json +0 -283
- data/lib/delivery/version.rb +0 -7
@@ -1,302 +1,302 @@
|
|
1
|
-
require 'delivery/builders/url_builder'
|
2
|
-
require 'delivery/query_parameters/query_string'
|
3
|
-
|
4
|
-
|
5
|
-
module
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
'
|
12
|
-
'
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
29
|
-
|
30
|
-
|
31
|
-
#
|
32
|
-
#
|
33
|
-
# *
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
# *
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
#
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
|
67
|
-
|
68
|
-
resp
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
#
|
98
|
-
#
|
99
|
-
#
|
100
|
-
# *
|
101
|
-
#
|
102
|
-
#
|
103
|
-
#
|
104
|
-
|
105
|
-
|
106
|
-
self
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
#
|
111
|
-
#
|
112
|
-
#
|
113
|
-
# *
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
|
118
|
-
|
119
|
-
self
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
#
|
124
|
-
#
|
125
|
-
# *
|
126
|
-
# - *
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
#
|
137
|
-
#
|
138
|
-
#
|
139
|
-
# *
|
140
|
-
#
|
141
|
-
#
|
142
|
-
#
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
#
|
150
|
-
#
|
151
|
-
#
|
152
|
-
#
|
153
|
-
# *
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
#
|
164
|
-
#
|
165
|
-
#
|
166
|
-
#
|
167
|
-
# *
|
168
|
-
#
|
169
|
-
#
|
170
|
-
#
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
#
|
178
|
-
#
|
179
|
-
#
|
180
|
-
#
|
181
|
-
# *
|
182
|
-
#
|
183
|
-
#
|
184
|
-
#
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
#
|
192
|
-
#
|
193
|
-
#
|
194
|
-
#
|
195
|
-
#
|
196
|
-
# *
|
197
|
-
#
|
198
|
-
#
|
199
|
-
#
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
#
|
207
|
-
#
|
208
|
-
#
|
209
|
-
#
|
210
|
-
#
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
#
|
218
|
-
#
|
219
|
-
#
|
220
|
-
#
|
221
|
-
#
|
222
|
-
#
|
223
|
-
#
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
#
|
232
|
-
#
|
233
|
-
#
|
234
|
-
# *
|
235
|
-
#
|
236
|
-
#
|
237
|
-
#
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
#
|
260
|
-
#
|
261
|
-
#
|
262
|
-
#
|
263
|
-
|
264
|
-
|
265
|
-
headers =
|
266
|
-
headers[
|
267
|
-
headers['Authorization'] = "Bearer #{
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
#
|
278
|
-
#
|
279
|
-
#
|
280
|
-
#
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
end
|
299
|
-
end
|
300
|
-
end
|
301
|
-
end
|
302
|
-
end
|
1
|
+
require 'delivery/builders/url_builder'
|
2
|
+
require 'delivery/query_parameters/query_string'
|
3
|
+
|
4
|
+
module Kentico
|
5
|
+
module Kontent
|
6
|
+
module Delivery
|
7
|
+
# Responsible for executing REST requests to Kentico Kontent.
|
8
|
+
class DeliveryQuery
|
9
|
+
ERROR_PREVIEW = 'Preview is enabled for the query, but the key is null. '\
|
10
|
+
'You can set the preview_key attribute of the query, or '\
|
11
|
+
'when you initialize the client. See '\
|
12
|
+
'https://github.com/Kentico/kontent-delivery-sdk-ruby#previewing-unpublished-content'.freeze
|
13
|
+
ERROR_PARAMS = 'Only filters may be passed in the .item or .items methods'\
|
14
|
+
'. See https://github.com/Kentico/kontent-delivery-sdk-ruby#filtering'.freeze
|
15
|
+
HEADER_WAIT_FOR_CONTENT = 'X-KC-Wait-For-Loading-New-Content'.freeze
|
16
|
+
HEADER_SDK_ID = 'X-KC-SDKID'.freeze
|
17
|
+
HEADER_CONTINUATION = 'X-Continuation'.freeze
|
18
|
+
attr_accessor :use_preview,
|
19
|
+
:preview_key,
|
20
|
+
:project_id,
|
21
|
+
:code_name,
|
22
|
+
:secure_key,
|
23
|
+
:content_link_url_resolver,
|
24
|
+
:inline_content_item_resolver,
|
25
|
+
:query_type,
|
26
|
+
:query_string,
|
27
|
+
:content_type,
|
28
|
+
:with_retry_policy
|
29
|
+
|
30
|
+
# Setter for a custom URL.
|
31
|
+
#
|
32
|
+
# * *Args*:
|
33
|
+
# - *url* (+string+) _optional_ Custom URL to use for the query
|
34
|
+
#
|
35
|
+
# * *Returns*:
|
36
|
+
# - +self+
|
37
|
+
def url(url = nil)
|
38
|
+
@url = url unless url.nil?
|
39
|
+
self
|
40
|
+
end
|
41
|
+
|
42
|
+
# Constructor. Queries should not be instantiated using the constructor, but
|
43
|
+
# using one of the Kentico::Kontent::Delivery::DeliveryClient methods instead.
|
44
|
+
#
|
45
|
+
# * *Args*:
|
46
|
+
# - *config* (+Hash+) A hash in which each key automatically has its value paired with the corresponding attribute
|
47
|
+
def initialize(config)
|
48
|
+
@headers = {}
|
49
|
+
|
50
|
+
# Map each hash value to attr with corresponding key
|
51
|
+
# from https://stackoverflow.com/a/2681014/5656214
|
52
|
+
config.each do |k, v|
|
53
|
+
instance_variable_set("@#{k}", v) unless v.nil?
|
54
|
+
end
|
55
|
+
self.query_string = Kentico::Kontent::Delivery::QueryParameters::QueryString.new
|
56
|
+
return if config.fetch(:qp, nil).nil?
|
57
|
+
|
58
|
+
# Query parameters were passed, parse and validate
|
59
|
+
validate_params config.fetch(:qp)
|
60
|
+
end
|
61
|
+
|
62
|
+
# Executes the REST request.
|
63
|
+
#
|
64
|
+
# * *Returns*:
|
65
|
+
# - Kentico::Kontent::Delivery::Responses::ResponseBase or a class extending it
|
66
|
+
def execute
|
67
|
+
resp = Kentico::Kontent::Delivery::RequestManager.start self, headers
|
68
|
+
yield resp if block_given?
|
69
|
+
resp
|
70
|
+
end
|
71
|
+
|
72
|
+
# Determines whether the query should use preview mode.
|
73
|
+
#
|
74
|
+
# * *Returns*:
|
75
|
+
# - +boolean+ Whether preview mode should be used for the query
|
76
|
+
#
|
77
|
+
# * *Raises*:
|
78
|
+
# - +StandardError+ if +use_preview+ is true, but +preview_key+ is +nil+
|
79
|
+
def should_preview
|
80
|
+
raise ERROR_PREVIEW if use_preview && preview_key.nil?
|
81
|
+
|
82
|
+
use_preview && !preview_key.nil?
|
83
|
+
end
|
84
|
+
|
85
|
+
# Enables the total_count attribute of the pagination object, which specifies
|
86
|
+
# the total number of items returned by the query regardless of paging. See
|
87
|
+
# https://docs.kontent.ai/reference/delivery-api#operation/list-content-items
|
88
|
+
#
|
89
|
+
# * *Returns*:
|
90
|
+
# - +self+
|
91
|
+
def include_total_count
|
92
|
+
query_string.set_param('includeTotalCount', 1)
|
93
|
+
self
|
94
|
+
end
|
95
|
+
|
96
|
+
# Sets a content link resolver to render links contained in rich text. See
|
97
|
+
# https://github.com/Kentico/kontent-delivery-sdk-ruby#resolving-links
|
98
|
+
#
|
99
|
+
# * *Args*:
|
100
|
+
# - *resolver* ( Kentico::Kontent::Delivery::Resolvers::ContentLinkResolver ) The resolver. Replaces a resolver registered during +DeliveryClient+ instantiation, for this query only.
|
101
|
+
#
|
102
|
+
# * *Returns*:
|
103
|
+
# - +self+
|
104
|
+
def with_link_resolver(resolver)
|
105
|
+
self.content_link_url_resolver = resolver
|
106
|
+
self
|
107
|
+
end
|
108
|
+
|
109
|
+
# Sets an inline content itme to render content items and components in rich text.
|
110
|
+
# See https://github.com/Kentico/kontent-delivery-sdk-ruby#resolving-inline-content
|
111
|
+
#
|
112
|
+
# * *Args*:
|
113
|
+
# - *resolver* ( Kentico::Kontent::Delivery::Resolvers::InlineContentItemResolver ) The resolver. Replaces a resolver registered during +DeliveryClient+ instantiation, for this query only.
|
114
|
+
#
|
115
|
+
# * *Returns*:
|
116
|
+
# - +self+
|
117
|
+
def with_inline_content_item_resolver(resolver)
|
118
|
+
self.inline_content_item_resolver = resolver
|
119
|
+
self
|
120
|
+
end
|
121
|
+
|
122
|
+
# Sets the 'order' query string parameter
|
123
|
+
#
|
124
|
+
# * *Args*:
|
125
|
+
# - *value* (+string+) The value to order by
|
126
|
+
# - *sort* (+string+) _optional_ The direction of the order, surrounded by brackets. The default value is '[asc]'
|
127
|
+
#
|
128
|
+
# * *Returns*:
|
129
|
+
# - +self+
|
130
|
+
def order_by(value, sort = '[asc]')
|
131
|
+
query_string.set_param('order', value + sort)
|
132
|
+
self
|
133
|
+
end
|
134
|
+
|
135
|
+
# Sets the 'skip' query string parameter for paging results.
|
136
|
+
# See https://developer.kenticocloud.com/v1/reference#listing-response-paging
|
137
|
+
#
|
138
|
+
# * *Args*:
|
139
|
+
# - *value* (+integer+) The number to skip by
|
140
|
+
#
|
141
|
+
# * *Returns*:
|
142
|
+
# - +self+
|
143
|
+
def skip(value)
|
144
|
+
query_string.set_param('skip', value) unless query_type.eql? Kentico::Kontent::Delivery::QUERY_TYPE_ITEMS_FEED
|
145
|
+
self
|
146
|
+
end
|
147
|
+
|
148
|
+
# Sets the 'language' query string parameter. Language fallbacks will be used
|
149
|
+
# if untranslated content items are found.
|
150
|
+
# See https://developer.kenticocloud.com/docs/localization#section-getting-localized-content-items
|
151
|
+
#
|
152
|
+
# * *Args*:
|
153
|
+
# - *value* (+string+) The code name of the desired language
|
154
|
+
#
|
155
|
+
# * *Returns*:
|
156
|
+
# - +self+
|
157
|
+
def language(value)
|
158
|
+
query_string.set_param('language', value)
|
159
|
+
self
|
160
|
+
end
|
161
|
+
|
162
|
+
# Sets the 'limit' query string parameter for paging results, or just to
|
163
|
+
# return a specific number of content items.
|
164
|
+
# See https://developer.kenticocloud.com/v1/reference#listing-response-paging
|
165
|
+
#
|
166
|
+
# * *Args*:
|
167
|
+
# - *value* (+integer+) The number of content items to return
|
168
|
+
#
|
169
|
+
# * *Returns*:
|
170
|
+
# - +self+
|
171
|
+
def limit(value)
|
172
|
+
query_string.set_param('limit', value) unless query_type.eql? Kentico::Kontent::Delivery::QUERY_TYPE_ITEMS_FEED
|
173
|
+
self
|
174
|
+
end
|
175
|
+
|
176
|
+
# Sets the 'elements' query string parameter to limit the elements returned
|
177
|
+
# by the query.
|
178
|
+
# See https://developer.kenticocloud.com/v1/reference#projection
|
179
|
+
#
|
180
|
+
# * *Args*:
|
181
|
+
# - *value* (+Array+) A single string or array of strings specifying the desired elements, e.g. %w[price product_name image]
|
182
|
+
#
|
183
|
+
# * *Returns*:
|
184
|
+
# - +self+
|
185
|
+
def elements(value)
|
186
|
+
query_string.set_param('elements', value)
|
187
|
+
self
|
188
|
+
end
|
189
|
+
|
190
|
+
# Sets the 'depth' query string parameter to determine how many levels of
|
191
|
+
# linked content items should be returned. By default, only 1 level of depth
|
192
|
+
# is used.
|
193
|
+
# See https://developer.kenticocloud.com/v1/reference#linked-content
|
194
|
+
#
|
195
|
+
# * *Args*:
|
196
|
+
# - *value* (+integer+) Level of linked items to be returned
|
197
|
+
#
|
198
|
+
# * *Returns*:
|
199
|
+
# - +self+
|
200
|
+
def depth(value)
|
201
|
+
query_string.set_param('depth', value) unless query_type.eql? Kentico::Kontent::Delivery::QUERY_TYPE_ITEMS_FEED
|
202
|
+
self
|
203
|
+
end
|
204
|
+
|
205
|
+
# Allows the request to bypass caching and return the latest content
|
206
|
+
# directly from Kentico Kontent.
|
207
|
+
# See https://github.com/Kentico/kontent-delivery-sdk-ruby#requesting-the-latest-content
|
208
|
+
#
|
209
|
+
# * *Returns*:
|
210
|
+
# - +self+
|
211
|
+
def request_latest_content
|
212
|
+
@headers[HEADER_WAIT_FOR_CONTENT] = true
|
213
|
+
self
|
214
|
+
end
|
215
|
+
|
216
|
+
# Uses Kentico::Kontent::Delivery::Builders::UrlBuilder.provide_url to set
|
217
|
+
# the URL for the query. The +UrlBuilder+ also validates the URL.
|
218
|
+
#
|
219
|
+
# * *Raises*:
|
220
|
+
# - +UriFormatException+ if the URL is 65,519 characters or more
|
221
|
+
#
|
222
|
+
# * *Returns*:
|
223
|
+
# - +string+ The full URL for this query
|
224
|
+
def provide_url
|
225
|
+
@url = Kentico::Kontent::Delivery::Builders::UrlBuilder.provide_url self if @url.nil?
|
226
|
+
Kentico::Kontent::Delivery::Builders::UrlBuilder.validate_url @url
|
227
|
+
@url
|
228
|
+
end
|
229
|
+
|
230
|
+
# Allows providing custom headers for client requests.
|
231
|
+
# See https://github.com/Kentico/kontent-delivery-sdk-ruby#providing-custom-headers
|
232
|
+
#
|
233
|
+
# * *Args*:
|
234
|
+
# - *headers* (+Hash+) A hash that corresponds to provided headers
|
235
|
+
#
|
236
|
+
# * *Returns*:
|
237
|
+
# - +self+
|
238
|
+
def custom_headers(headers)
|
239
|
+
@custom_headers = headers
|
240
|
+
self
|
241
|
+
end
|
242
|
+
|
243
|
+
def update_continuation(token)
|
244
|
+
@headers[HEADER_CONTINUATION] = token
|
245
|
+
self
|
246
|
+
end
|
247
|
+
|
248
|
+
def continuation_exists?
|
249
|
+
!continuation_token.nil?
|
250
|
+
end
|
251
|
+
|
252
|
+
def continuation_token
|
253
|
+
@headers[HEADER_CONTINUATION]
|
254
|
+
end
|
255
|
+
|
256
|
+
private
|
257
|
+
|
258
|
+
# Returns request headers that are extended with custom headers.
|
259
|
+
# Custom headers do not override existing headers.
|
260
|
+
#
|
261
|
+
# * *Returns*
|
262
|
+
# - +Hash+
|
263
|
+
def headers
|
264
|
+
headers = @headers.clone
|
265
|
+
headers[HEADER_SDK_ID] = provide_sdk_header
|
266
|
+
headers['Authorization'] = "Bearer #{preview_key}" if should_preview
|
267
|
+
headers['Authorization'] = "Bearer #{secure_key}" if !should_preview && secure_key
|
268
|
+
|
269
|
+
if @custom_headers
|
270
|
+
headers.merge!(@custom_headers) { |key, v1, v2| v1 }
|
271
|
+
end
|
272
|
+
|
273
|
+
headers
|
274
|
+
end
|
275
|
+
|
276
|
+
# Initializes the +query_string+ attribute with the passed array of
|
277
|
+
# Kentico::Kontent::Delivery::QueryParameters::Filter objects.
|
278
|
+
#
|
279
|
+
# * *Raises*:
|
280
|
+
# - +ArgumentError+ if one the passed objects is not a +Filter+
|
281
|
+
def validate_params(query_parameters)
|
282
|
+
params = if query_parameters.is_a? Array
|
283
|
+
query_parameters
|
284
|
+
else
|
285
|
+
[query_parameters]
|
286
|
+
end
|
287
|
+
params.each do |p|
|
288
|
+
query_string.set_param p
|
289
|
+
unless p.is_a? Kentico::Kontent::Delivery::QueryParameters::Filter
|
290
|
+
raise ArgumentError, ERROR_PARAMS
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
def provide_sdk_header
|
296
|
+
spec = Gem::Specification::load('kontent-delivery-sdk-ruby.gemspec')
|
297
|
+
'rubygems.org;kontent-delivery-sdk-ruby;' + spec.version.to_s
|
298
|
+
end
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
302
|
+
end
|