imgwire 0.1.0

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 (59) hide show
  1. checksums.yaml +7 -0
  2. data/AGENTS.md +8 -0
  3. data/CODEGEN_VERSION +1 -0
  4. data/LICENSE +21 -0
  5. data/README.md +159 -0
  6. data/generated/lib/imgwire-generated/api/cors_origins_api.rb +355 -0
  7. data/generated/lib/imgwire-generated/api/custom_domain_api.rb +253 -0
  8. data/generated/lib/imgwire-generated/api/images_api.rb +534 -0
  9. data/generated/lib/imgwire-generated/api/metrics_api.rb +156 -0
  10. data/generated/lib/imgwire-generated/api_client.rb +392 -0
  11. data/generated/lib/imgwire-generated/api_error.rb +58 -0
  12. data/generated/lib/imgwire-generated/configuration.rb +301 -0
  13. data/generated/lib/imgwire-generated/models/bulk_delete_images_schema.rb +248 -0
  14. data/generated/lib/imgwire-generated/models/cache_hit_ratio_dataset_point_schema.rb +263 -0
  15. data/generated/lib/imgwire-generated/models/cors_origin_create_schema.rb +246 -0
  16. data/generated/lib/imgwire-generated/models/cors_origin_schema.rb +341 -0
  17. data/generated/lib/imgwire-generated/models/cors_origin_update_schema.rb +246 -0
  18. data/generated/lib/imgwire-generated/models/custom_domain_certificate_status.rb +41 -0
  19. data/generated/lib/imgwire-generated/models/custom_domain_create_schema.rb +237 -0
  20. data/generated/lib/imgwire-generated/models/custom_domain_schema.rb +531 -0
  21. data/generated/lib/imgwire-generated/models/custom_domain_status.rb +41 -0
  22. data/generated/lib/imgwire-generated/models/custom_metadata_value.rb +106 -0
  23. data/generated/lib/imgwire-generated/models/http_validation_error.rb +222 -0
  24. data/generated/lib/imgwire-generated/models/image_download_job_create_schema.rb +248 -0
  25. data/generated/lib/imgwire-generated/models/image_download_job_schema.rb +389 -0
  26. data/generated/lib/imgwire-generated/models/image_download_status.rb +42 -0
  27. data/generated/lib/imgwire-generated/models/image_schema.rb +659 -0
  28. data/generated/lib/imgwire-generated/models/image_status.rb +42 -0
  29. data/generated/lib/imgwire-generated/models/location_inner.rb +104 -0
  30. data/generated/lib/imgwire-generated/models/metrics_dataset_interval.rb +42 -0
  31. data/generated/lib/imgwire-generated/models/metrics_datasets_schema.rb +379 -0
  32. data/generated/lib/imgwire-generated/models/metrics_stat_value_schema.rb +275 -0
  33. data/generated/lib/imgwire-generated/models/metrics_stats_schema.rb +367 -0
  34. data/generated/lib/imgwire-generated/models/requests_dataset_point_schema.rb +263 -0
  35. data/generated/lib/imgwire-generated/models/standard_upload_create_schema.rb +415 -0
  36. data/generated/lib/imgwire-generated/models/standard_upload_response_schema.rb +263 -0
  37. data/generated/lib/imgwire-generated/models/storage_bytes_dataset_point_schema.rb +289 -0
  38. data/generated/lib/imgwire-generated/models/supported_mime_type.rb +43 -0
  39. data/generated/lib/imgwire-generated/models/transfer_bytes_dataset_point_schema.rb +263 -0
  40. data/generated/lib/imgwire-generated/models/transformations_dataset_point_schema.rb +263 -0
  41. data/generated/lib/imgwire-generated/models/upload_token_create_response_schema.rb +379 -0
  42. data/generated/lib/imgwire-generated/models/uploads_dataset_point_schema.rb +263 -0
  43. data/generated/lib/imgwire-generated/models/validation_error.rb +291 -0
  44. data/generated/lib/imgwire-generated/version.rb +15 -0
  45. data/generated/lib/imgwire-generated.rb +74 -0
  46. data/lib/imgwire/client.rb +52 -0
  47. data/lib/imgwire/client_options.rb +14 -0
  48. data/lib/imgwire/http/upload_client.rb +53 -0
  49. data/lib/imgwire/image.rb +137 -0
  50. data/lib/imgwire/pagination.rb +82 -0
  51. data/lib/imgwire/resources/base_resource.rb +29 -0
  52. data/lib/imgwire/resources/cors_origins_resource.rb +47 -0
  53. data/lib/imgwire/resources/custom_domain_resource.rb +30 -0
  54. data/lib/imgwire/resources/images_resource.rb +106 -0
  55. data/lib/imgwire/resources/metrics_resource.rb +24 -0
  56. data/lib/imgwire/uploads.rb +78 -0
  57. data/lib/imgwire/version.rb +5 -0
  58. data/lib/imgwire.rb +18 -0
  59. metadata +158 -0
@@ -0,0 +1,253 @@
1
+ =begin
2
+ #imgwire.dev Backend API development
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 0.1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.14.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module ImgwireGenerated
16
+ class CustomDomainApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create Custom Domain
23
+ # @param custom_domain_create_schema [CustomDomainCreateSchema]
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [CustomDomainSchema]
26
+ def custom_domain_create(custom_domain_create_schema, opts = {})
27
+ data, _status_code, _headers = custom_domain_create_with_http_info(custom_domain_create_schema, opts)
28
+ data
29
+ end
30
+
31
+ # Create Custom Domain
32
+ # @param custom_domain_create_schema [CustomDomainCreateSchema]
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(CustomDomainSchema, Integer, Hash)>] CustomDomainSchema data, response status code and response headers
35
+ def custom_domain_create_with_http_info(custom_domain_create_schema, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: CustomDomainApi.custom_domain_create ...'
38
+ end
39
+ # verify the required parameter 'custom_domain_create_schema' is set
40
+ if @api_client.config.client_side_validation && custom_domain_create_schema.nil?
41
+ fail ArgumentError, "Missing the required parameter 'custom_domain_create_schema' when calling CustomDomainApi.custom_domain_create"
42
+ end
43
+ # resource path
44
+ local_var_path = '/api/v1/custom_domain/'
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
53
+ # HTTP header 'Content-Type'
54
+ content_type = @api_client.select_header_content_type(['application/json'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(custom_domain_create_schema)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'CustomDomainSchema'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || []
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"CustomDomainApi.custom_domain_create",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: CustomDomainApi#custom_domain_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Delete Custom Domain
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [Hash<String, String>]
91
+ def custom_domain_delete(opts = {})
92
+ data, _status_code, _headers = custom_domain_delete_with_http_info(opts)
93
+ data
94
+ end
95
+
96
+ # Delete Custom Domain
97
+ # @param [Hash] opts the optional parameters
98
+ # @return [Array<(Hash<String, String>, Integer, Hash)>] Hash<String, String> data, response status code and response headers
99
+ def custom_domain_delete_with_http_info(opts = {})
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug 'Calling API: CustomDomainApi.custom_domain_delete ...'
102
+ end
103
+ # resource path
104
+ local_var_path = '/api/v1/custom_domain/'
105
+
106
+ # query parameters
107
+ query_params = opts[:query_params] || {}
108
+
109
+ # header parameters
110
+ header_params = opts[:header_params] || {}
111
+ # HTTP header 'Accept' (if needed)
112
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
113
+
114
+ # form parameters
115
+ form_params = opts[:form_params] || {}
116
+
117
+ # http body (model)
118
+ post_body = opts[:debug_body]
119
+
120
+ # return_type
121
+ return_type = opts[:debug_return_type] || 'Hash<String, String>'
122
+
123
+ # auth_names
124
+ auth_names = opts[:debug_auth_names] || []
125
+
126
+ new_options = opts.merge(
127
+ :operation => :"CustomDomainApi.custom_domain_delete",
128
+ :header_params => header_params,
129
+ :query_params => query_params,
130
+ :form_params => form_params,
131
+ :body => post_body,
132
+ :auth_names => auth_names,
133
+ :return_type => return_type
134
+ )
135
+
136
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
137
+ if @api_client.config.debugging
138
+ @api_client.config.logger.debug "API called: CustomDomainApi#custom_domain_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
139
+ end
140
+ return data, status_code, headers
141
+ end
142
+
143
+ # Get Custom Domain
144
+ # @param [Hash] opts the optional parameters
145
+ # @return [CustomDomainSchema]
146
+ def custom_domain_retrieve(opts = {})
147
+ data, _status_code, _headers = custom_domain_retrieve_with_http_info(opts)
148
+ data
149
+ end
150
+
151
+ # Get Custom Domain
152
+ # @param [Hash] opts the optional parameters
153
+ # @return [Array<(CustomDomainSchema, Integer, Hash)>] CustomDomainSchema data, response status code and response headers
154
+ def custom_domain_retrieve_with_http_info(opts = {})
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug 'Calling API: CustomDomainApi.custom_domain_retrieve ...'
157
+ end
158
+ # resource path
159
+ local_var_path = '/api/v1/custom_domain/'
160
+
161
+ # query parameters
162
+ query_params = opts[:query_params] || {}
163
+
164
+ # header parameters
165
+ header_params = opts[:header_params] || {}
166
+ # HTTP header 'Accept' (if needed)
167
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
168
+
169
+ # form parameters
170
+ form_params = opts[:form_params] || {}
171
+
172
+ # http body (model)
173
+ post_body = opts[:debug_body]
174
+
175
+ # return_type
176
+ return_type = opts[:debug_return_type] || 'CustomDomainSchema'
177
+
178
+ # auth_names
179
+ auth_names = opts[:debug_auth_names] || []
180
+
181
+ new_options = opts.merge(
182
+ :operation => :"CustomDomainApi.custom_domain_retrieve",
183
+ :header_params => header_params,
184
+ :query_params => query_params,
185
+ :form_params => form_params,
186
+ :body => post_body,
187
+ :auth_names => auth_names,
188
+ :return_type => return_type
189
+ )
190
+
191
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
192
+ if @api_client.config.debugging
193
+ @api_client.config.logger.debug "API called: CustomDomainApi#custom_domain_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
194
+ end
195
+ return data, status_code, headers
196
+ end
197
+
198
+ # Test Custom Domain Connection
199
+ # @param [Hash] opts the optional parameters
200
+ # @return [CustomDomainSchema]
201
+ def custom_domain_test_connection(opts = {})
202
+ data, _status_code, _headers = custom_domain_test_connection_with_http_info(opts)
203
+ data
204
+ end
205
+
206
+ # Test Custom Domain Connection
207
+ # @param [Hash] opts the optional parameters
208
+ # @return [Array<(CustomDomainSchema, Integer, Hash)>] CustomDomainSchema data, response status code and response headers
209
+ def custom_domain_test_connection_with_http_info(opts = {})
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug 'Calling API: CustomDomainApi.custom_domain_test_connection ...'
212
+ end
213
+ # resource path
214
+ local_var_path = '/api/v1/custom_domain/test_connection'
215
+
216
+ # query parameters
217
+ query_params = opts[:query_params] || {}
218
+
219
+ # header parameters
220
+ header_params = opts[:header_params] || {}
221
+ # HTTP header 'Accept' (if needed)
222
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
223
+
224
+ # form parameters
225
+ form_params = opts[:form_params] || {}
226
+
227
+ # http body (model)
228
+ post_body = opts[:debug_body]
229
+
230
+ # return_type
231
+ return_type = opts[:debug_return_type] || 'CustomDomainSchema'
232
+
233
+ # auth_names
234
+ auth_names = opts[:debug_auth_names] || []
235
+
236
+ new_options = opts.merge(
237
+ :operation => :"CustomDomainApi.custom_domain_test_connection",
238
+ :header_params => header_params,
239
+ :query_params => query_params,
240
+ :form_params => form_params,
241
+ :body => post_body,
242
+ :auth_names => auth_names,
243
+ :return_type => return_type
244
+ )
245
+
246
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
247
+ if @api_client.config.debugging
248
+ @api_client.config.logger.debug "API called: CustomDomainApi#custom_domain_test_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
249
+ end
250
+ return data, status_code, headers
251
+ end
252
+ end
253
+ end