svix 1.31.0 → 1.33.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22bfe8f4a502306bc13437d46b40935eb41a7efe25ac096e1056ba9e6eca19c6
4
- data.tar.gz: 9749c603d86b9401880aa577fc4ae2cba3e9f856f45a654f256179b4626cc483
3
+ metadata.gz: db2086df8699927051df7b90ef7cbdb3cb4221f413279e6ac090798610210b48
4
+ data.tar.gz: 8934a5721f4b144fa57be63a4f237f71041d38363f38d733ae979179ea72f276
5
5
  SHA512:
6
- metadata.gz: 3a3ef6ce6ce7bf4f9ff383c2bb234a16fab5136822720eb7360b4ae3a75b4e200f0f76aa5751c9bbcd96a9dc124ae8bd88195bd01c550fd23a1765d8943a7ebe
7
- data.tar.gz: ef6156f84b5f5b2233ac7c3a6430e6658f0022d155566d153354e78b16ebf78f6e4a9f64b4d52dd9e1729acc01749e911f7487db956960075f1756c7697621fd
6
+ metadata.gz: 2e128e90fca79b910ea7a4c4488199e2a9e7277f3e89187920d5af0f01e696710892cb588648a3c010fa0c6d03525122d65a1feb79b2069308a9acdf1926926a
7
+ data.tar.gz: cbbd5eb93582444752311aacbc983fa3098af1d3b049374cc2282ccb4f3d6981eb4127e93444b083f4ae630511467a3640a9b0a4fe3d55eab83b4466cf928bc0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.31.0)
4
+ svix (1.33.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -882,7 +882,7 @@ module Svix
882
882
  fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageApi.v1_message_list, the character length must be smaller than or equal to 128.'
883
883
  end
884
884
 
885
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
885
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
886
886
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
887
887
  fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageApi.v1_message_list, must conform to the pattern #{pattern}."
888
888
  end
@@ -516,7 +516,7 @@ module Svix
516
516
  fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, the character length must be smaller than or equal to 128.'
517
517
  end
518
518
 
519
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
519
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
520
520
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
521
521
  fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_attempted_messages, must conform to the pattern #{pattern}."
522
522
  end
@@ -668,7 +668,7 @@ module Svix
668
668
  fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, the character length must be smaller than or equal to 128.'
669
669
  end
670
670
 
671
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
671
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
672
672
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
673
673
  fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint, must conform to the pattern #{pattern}."
674
674
  end
@@ -835,7 +835,7 @@ module Svix
835
835
  fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint_deprecated, the character length must be smaller than or equal to 128.'
836
836
  end
837
837
 
838
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
838
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
839
839
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
840
840
  fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_endpoint_deprecated, must conform to the pattern #{pattern}."
841
841
  end
@@ -986,7 +986,7 @@ module Svix
986
986
  fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.v1_message_attempt_list_by_msg, the character length must be smaller than or equal to 128.'
987
987
  end
988
988
 
989
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
989
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
990
990
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
991
991
  fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_msg, must conform to the pattern #{pattern}."
992
992
  end
@@ -1164,7 +1164,7 @@ module Svix
1164
1164
  fail ArgumentError, 'invalid value for "opts[:"channel"]" when calling MessageAttemptApi.v1_message_attempt_list_by_msg_deprecated, the character length must be smaller than or equal to 128.'
1165
1165
  end
1166
1166
 
1167
- pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
1167
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.:]+$/)
1168
1168
  if @api_client.config.client_side_validation && !opts[:'channel'].nil? && opts[:'channel'] !~ pattern
1169
1169
  fail ArgumentError, "invalid value for 'opts[:\"channel\"]' when calling MessageAttemptApi.v1_message_attempt_list_by_msg_deprecated, must conform to the pattern #{pattern}."
1170
1170
  end
@@ -0,0 +1,176 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.1.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Svix
16
+ class SinkApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Append To Stream
23
+ # Creates streaming events.
24
+ # @param stream_id [String]
25
+ # @param create_stream_in [CreateStreamIn]
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :idempotency_key The request's idempotency key
28
+ # @return [Object]
29
+ def v1_stream_create_events(stream_id, create_stream_in, opts = {})
30
+ data, _status_code, _headers = v1_stream_create_events_with_http_info(stream_id, create_stream_in, opts)
31
+ data
32
+ end
33
+
34
+ # Append To Stream
35
+ # Creates streaming events.
36
+ # @param stream_id [String]
37
+ # @param create_stream_in [CreateStreamIn]
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :idempotency_key The request's idempotency key
40
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
41
+ def v1_stream_create_events_with_http_info(stream_id, create_stream_in, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: SinkApi.v1_stream_create_events ...'
44
+ end
45
+ # verify the required parameter 'stream_id' is set
46
+ if @api_client.config.client_side_validation && stream_id.nil?
47
+ fail ArgumentError, "Missing the required parameter 'stream_id' when calling SinkApi.v1_stream_create_events"
48
+ end
49
+ # verify the required parameter 'create_stream_in' is set
50
+ if @api_client.config.client_side_validation && create_stream_in.nil?
51
+ fail ArgumentError, "Missing the required parameter 'create_stream_in' when calling SinkApi.v1_stream_create_events"
52
+ end
53
+ # resource path
54
+ local_var_path = '/api/v1/stream/{stream_id}/events'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
55
+
56
+ # query parameters
57
+ query_params = opts[:query_params] || {}
58
+
59
+ # header parameters
60
+ header_params = opts[:header_params] || {}
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+ # HTTP header 'Content-Type'
64
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
65
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_stream_in)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'Object'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"SinkApi.v1_stream_create_events",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: SinkApi#v1_stream_create_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # Stream Events
97
+ # Iterate over a stream of events.
98
+ # @param stream_id [String]
99
+ # @param [Hash] opts the optional parameters
100
+ # @option opts [Integer] :limit Limit the number of returned items
101
+ # @option opts [String] :iterator The iterator returned from a prior invocation
102
+ # @option opts [Time] :after
103
+ # @return [EventStreamOut]
104
+ def v1_stream_events_get(stream_id, opts = {})
105
+ data, _status_code, _headers = v1_stream_events_get_with_http_info(stream_id, opts)
106
+ data
107
+ end
108
+
109
+ # Stream Events
110
+ # Iterate over a stream of events.
111
+ # @param stream_id [String]
112
+ # @param [Hash] opts the optional parameters
113
+ # @option opts [Integer] :limit Limit the number of returned items
114
+ # @option opts [String] :iterator The iterator returned from a prior invocation
115
+ # @option opts [Time] :after
116
+ # @return [Array<(EventStreamOut, Integer, Hash)>] EventStreamOut data, response status code and response headers
117
+ def v1_stream_events_get_with_http_info(stream_id, opts = {})
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug 'Calling API: SinkApi.v1_stream_events_get ...'
120
+ end
121
+ # verify the required parameter 'stream_id' is set
122
+ if @api_client.config.client_side_validation && stream_id.nil?
123
+ fail ArgumentError, "Missing the required parameter 'stream_id' when calling SinkApi.v1_stream_events_get"
124
+ end
125
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
126
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SinkApi.v1_stream_events_get, must be smaller than or equal to 250.'
127
+ end
128
+
129
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
130
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SinkApi.v1_stream_events_get, must be greater than or equal to 1.'
131
+ end
132
+
133
+ # resource path
134
+ local_var_path = '/api/v1/stream/{stream_id}/events'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
135
+
136
+ # query parameters
137
+ query_params = opts[:query_params] || {}
138
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
139
+ query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
140
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
141
+
142
+ # header parameters
143
+ header_params = opts[:header_params] || {}
144
+ # HTTP header 'Accept' (if needed)
145
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
146
+
147
+ # form parameters
148
+ form_params = opts[:form_params] || {}
149
+
150
+ # http body (model)
151
+ post_body = opts[:debug_body]
152
+
153
+ # return_type
154
+ return_type = opts[:debug_return_type] || 'EventStreamOut'
155
+
156
+ # auth_names
157
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
158
+
159
+ new_options = opts.merge(
160
+ :operation => :"SinkApi.v1_stream_events_get",
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => return_type
167
+ )
168
+
169
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
170
+ if @api_client.config.debugging
171
+ @api_client.config.logger.debug "API called: SinkApi#v1_stream_events_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
+ end
173
+ return data, status_code, headers
174
+ end
175
+ end
176
+ end
@@ -0,0 +1,432 @@
1
+ =begin
2
+ #Svix API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.1.1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.2.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Svix
16
+ class StreamApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Stream
23
+ # Creates a new stream.
24
+ # @param stream_in [StreamIn]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
27
+ # @return [StreamOut]
28
+ def v1_stream_create(stream_in, opts = {})
29
+ data, _status_code, _headers = v1_stream_create_with_http_info(stream_in, opts)
30
+ data
31
+ end
32
+
33
+ # Create Stream
34
+ # Creates a new stream.
35
+ # @param stream_in [StreamIn]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
38
+ # @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
39
+ def v1_stream_create_with_http_info(stream_in, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_create ...'
42
+ end
43
+ # verify the required parameter 'stream_in' is set
44
+ if @api_client.config.client_side_validation && stream_in.nil?
45
+ fail ArgumentError, "Missing the required parameter 'stream_in' when calling StreamApi.v1_stream_create"
46
+ end
47
+ # resource path
48
+ local_var_path = '/api/v1/stream'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(stream_in)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'StreamOut'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"StreamApi.v1_stream_create",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: StreamApi#v1_stream_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Delete Stream
91
+ # Delete a stream.
92
+ # @param stream_id [String]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [nil]
95
+ def v1_stream_delete(stream_id, opts = {})
96
+ v1_stream_delete_with_http_info(stream_id, opts)
97
+ nil
98
+ end
99
+
100
+ # Delete Stream
101
+ # Delete a stream.
102
+ # @param stream_id [String]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
105
+ def v1_stream_delete_with_http_info(stream_id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_delete ...'
108
+ end
109
+ # verify the required parameter 'stream_id' is set
110
+ if @api_client.config.client_side_validation && stream_id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_delete"
112
+ end
113
+ # resource path
114
+ local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type]
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"StreamApi.v1_stream_delete",
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: StreamApi#v1_stream_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # Get Stream
154
+ # Get a stream by id or uid.
155
+ # @param stream_id [String]
156
+ # @param [Hash] opts the optional parameters
157
+ # @return [StreamOut]
158
+ def v1_stream_get(stream_id, opts = {})
159
+ data, _status_code, _headers = v1_stream_get_with_http_info(stream_id, opts)
160
+ data
161
+ end
162
+
163
+ # Get Stream
164
+ # Get a stream by id or uid.
165
+ # @param stream_id [String]
166
+ # @param [Hash] opts the optional parameters
167
+ # @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
168
+ def v1_stream_get_with_http_info(stream_id, opts = {})
169
+ if @api_client.config.debugging
170
+ @api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_get ...'
171
+ end
172
+ # verify the required parameter 'stream_id' is set
173
+ if @api_client.config.client_side_validation && stream_id.nil?
174
+ fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_get"
175
+ end
176
+ # resource path
177
+ local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
178
+
179
+ # query parameters
180
+ query_params = opts[:query_params] || {}
181
+
182
+ # header parameters
183
+ header_params = opts[:header_params] || {}
184
+ # HTTP header 'Accept' (if needed)
185
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
186
+
187
+ # form parameters
188
+ form_params = opts[:form_params] || {}
189
+
190
+ # http body (model)
191
+ post_body = opts[:debug_body]
192
+
193
+ # return_type
194
+ return_type = opts[:debug_return_type] || 'StreamOut'
195
+
196
+ # auth_names
197
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
198
+
199
+ new_options = opts.merge(
200
+ :operation => :"StreamApi.v1_stream_get",
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => return_type
207
+ )
208
+
209
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug "API called: StreamApi#v1_stream_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
212
+ end
213
+ return data, status_code, headers
214
+ end
215
+
216
+ # List Streams
217
+ # List of all the organization's streams.
218
+ # @param [Hash] opts the optional parameters
219
+ # @option opts [Integer] :limit Limit the number of returned items
220
+ # @option opts [String] :iterator The iterator returned from a prior invocation
221
+ # @option opts [Ordering] :order The sorting order of the returned items
222
+ # @return [ListResponseStreamOut]
223
+ def v1_stream_list(opts = {})
224
+ data, _status_code, _headers = v1_stream_list_with_http_info(opts)
225
+ data
226
+ end
227
+
228
+ # List Streams
229
+ # List of all the organization&#39;s streams.
230
+ # @param [Hash] opts the optional parameters
231
+ # @option opts [Integer] :limit Limit the number of returned items
232
+ # @option opts [String] :iterator The iterator returned from a prior invocation
233
+ # @option opts [Ordering] :order The sorting order of the returned items
234
+ # @return [Array<(ListResponseStreamOut, Integer, Hash)>] ListResponseStreamOut data, response status code and response headers
235
+ def v1_stream_list_with_http_info(opts = {})
236
+ if @api_client.config.debugging
237
+ @api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_list ...'
238
+ end
239
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
240
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.v1_stream_list, must be smaller than or equal to 250.'
241
+ end
242
+
243
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
244
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling StreamApi.v1_stream_list, must be greater than or equal to 1.'
245
+ end
246
+
247
+ # resource path
248
+ local_var_path = '/api/v1/stream'
249
+
250
+ # query parameters
251
+ query_params = opts[:query_params] || {}
252
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
253
+ query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
254
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
260
+
261
+ # form parameters
262
+ form_params = opts[:form_params] || {}
263
+
264
+ # http body (model)
265
+ post_body = opts[:debug_body]
266
+
267
+ # return_type
268
+ return_type = opts[:debug_return_type] || 'ListResponseStreamOut'
269
+
270
+ # auth_names
271
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
272
+
273
+ new_options = opts.merge(
274
+ :operation => :"StreamApi.v1_stream_list",
275
+ :header_params => header_params,
276
+ :query_params => query_params,
277
+ :form_params => form_params,
278
+ :body => post_body,
279
+ :auth_names => auth_names,
280
+ :return_type => return_type
281
+ )
282
+
283
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
284
+ if @api_client.config.debugging
285
+ @api_client.config.logger.debug "API called: StreamApi#v1_stream_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
286
+ end
287
+ return data, status_code, headers
288
+ end
289
+
290
+ # Patch Stream
291
+ # Partially update a stream.
292
+ # @param stream_id [String]
293
+ # @param stream_patch [StreamPatch]
294
+ # @param [Hash] opts the optional parameters
295
+ # @return [StreamOut]
296
+ def v1_stream_patch(stream_id, stream_patch, opts = {})
297
+ data, _status_code, _headers = v1_stream_patch_with_http_info(stream_id, stream_patch, opts)
298
+ data
299
+ end
300
+
301
+ # Patch Stream
302
+ # Partially update a stream.
303
+ # @param stream_id [String]
304
+ # @param stream_patch [StreamPatch]
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
307
+ def v1_stream_patch_with_http_info(stream_id, stream_patch, opts = {})
308
+ if @api_client.config.debugging
309
+ @api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_patch ...'
310
+ end
311
+ # verify the required parameter 'stream_id' is set
312
+ if @api_client.config.client_side_validation && stream_id.nil?
313
+ fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_patch"
314
+ end
315
+ # verify the required parameter 'stream_patch' is set
316
+ if @api_client.config.client_side_validation && stream_patch.nil?
317
+ fail ArgumentError, "Missing the required parameter 'stream_patch' when calling StreamApi.v1_stream_patch"
318
+ end
319
+ # resource path
320
+ local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
321
+
322
+ # query parameters
323
+ query_params = opts[:query_params] || {}
324
+
325
+ # header parameters
326
+ header_params = opts[:header_params] || {}
327
+ # HTTP header 'Accept' (if needed)
328
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
329
+ # HTTP header 'Content-Type'
330
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
331
+
332
+ # form parameters
333
+ form_params = opts[:form_params] || {}
334
+
335
+ # http body (model)
336
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(stream_patch)
337
+
338
+ # return_type
339
+ return_type = opts[:debug_return_type] || 'StreamOut'
340
+
341
+ # auth_names
342
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
343
+
344
+ new_options = opts.merge(
345
+ :operation => :"StreamApi.v1_stream_patch",
346
+ :header_params => header_params,
347
+ :query_params => query_params,
348
+ :form_params => form_params,
349
+ :body => post_body,
350
+ :auth_names => auth_names,
351
+ :return_type => return_type
352
+ )
353
+
354
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug "API called: StreamApi#v1_stream_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
357
+ end
358
+ return data, status_code, headers
359
+ end
360
+
361
+ # Update Stream
362
+ # Update a stream.
363
+ # @param stream_id [String]
364
+ # @param stream_in [StreamIn]
365
+ # @param [Hash] opts the optional parameters
366
+ # @return [StreamOut]
367
+ def v1_stream_update(stream_id, stream_in, opts = {})
368
+ data, _status_code, _headers = v1_stream_update_with_http_info(stream_id, stream_in, opts)
369
+ data
370
+ end
371
+
372
+ # Update Stream
373
+ # Update a stream.
374
+ # @param stream_id [String]
375
+ # @param stream_in [StreamIn]
376
+ # @param [Hash] opts the optional parameters
377
+ # @return [Array<(StreamOut, Integer, Hash)>] StreamOut data, response status code and response headers
378
+ def v1_stream_update_with_http_info(stream_id, stream_in, opts = {})
379
+ if @api_client.config.debugging
380
+ @api_client.config.logger.debug 'Calling API: StreamApi.v1_stream_update ...'
381
+ end
382
+ # verify the required parameter 'stream_id' is set
383
+ if @api_client.config.client_side_validation && stream_id.nil?
384
+ fail ArgumentError, "Missing the required parameter 'stream_id' when calling StreamApi.v1_stream_update"
385
+ end
386
+ # verify the required parameter 'stream_in' is set
387
+ if @api_client.config.client_side_validation && stream_in.nil?
388
+ fail ArgumentError, "Missing the required parameter 'stream_in' when calling StreamApi.v1_stream_update"
389
+ end
390
+ # resource path
391
+ local_var_path = '/api/v1/stream/{stream_id}'.sub('{' + 'stream_id' + '}', CGI.escape(stream_id.to_s))
392
+
393
+ # query parameters
394
+ query_params = opts[:query_params] || {}
395
+
396
+ # header parameters
397
+ header_params = opts[:header_params] || {}
398
+ # HTTP header 'Accept' (if needed)
399
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
400
+ # HTTP header 'Content-Type'
401
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
402
+
403
+ # form parameters
404
+ form_params = opts[:form_params] || {}
405
+
406
+ # http body (model)
407
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(stream_in)
408
+
409
+ # return_type
410
+ return_type = opts[:debug_return_type] || 'StreamOut'
411
+
412
+ # auth_names
413
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
414
+
415
+ new_options = opts.merge(
416
+ :operation => :"StreamApi.v1_stream_update",
417
+ :header_params => header_params,
418
+ :query_params => query_params,
419
+ :form_params => form_params,
420
+ :body => post_body,
421
+ :auth_names => auth_names,
422
+ :return_type => return_type
423
+ )
424
+
425
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
426
+ if @api_client.config.debugging
427
+ @api_client.config.logger.debug "API called: StreamApi#v1_stream_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
428
+ end
429
+ return data, status_code, headers
430
+ end
431
+ end
432
+ end