aimastering 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +167 -0
  4. data/Rakefile +8 -0
  5. data/aimastering.gemspec +45 -0
  6. data/docs/AccessToken.md +8 -0
  7. data/docs/AccessTokenApi.md +55 -0
  8. data/docs/AnonymizedMastering.md +29 -0
  9. data/docs/Audio.md +29 -0
  10. data/docs/AudioAnalysis.md +10 -0
  11. data/docs/AudioApi.md +374 -0
  12. data/docs/AudioDownloadToken.md +9 -0
  13. data/docs/Config.md +10 -0
  14. data/docs/ConfigApi.md +55 -0
  15. data/docs/ConfigAuth0.md +10 -0
  16. data/docs/ConfigPaypal.md +9 -0
  17. data/docs/ConfigStripe.md +8 -0
  18. data/docs/DateTime.md +7 -0
  19. data/docs/ExternalSearchApi.md +64 -0
  20. data/docs/ExternalSearchResult.md +9 -0
  21. data/docs/ExternalSearchResultItunes.md +18 -0
  22. data/docs/ExternalSearchResultYoutube.md +15 -0
  23. data/docs/JWT.md +7 -0
  24. data/docs/Kpi.md +7 -0
  25. data/docs/LibraryAudio.md +38 -0
  26. data/docs/LibraryAudioAnalysis.md +10 -0
  27. data/docs/LibraryAudioApi.md +378 -0
  28. data/docs/LibraryAudioLike.md +10 -0
  29. data/docs/Mastering.md +35 -0
  30. data/docs/MasteringApi.md +482 -0
  31. data/docs/Payment.md +14 -0
  32. data/docs/PaymentApi.md +224 -0
  33. data/docs/PaymentCustomer.md +11 -0
  34. data/docs/PaymentCustomerApi.md +55 -0
  35. data/docs/Plan.md +12 -0
  36. data/docs/PlanApi.md +55 -0
  37. data/docs/StatisticsApi.md +102 -0
  38. data/docs/Subscription.md +17 -0
  39. data/docs/SubscriptionApi.md +273 -0
  40. data/docs/User.md +14 -0
  41. data/docs/UserApi.md +111 -0
  42. data/docs/Video.md +13 -0
  43. data/docs/VideoApi.md +267 -0
  44. data/docs/VideoDownloadToken.md +9 -0
  45. data/git_push.sh +55 -0
  46. data/lib/aimastering.rb +77 -0
  47. data/lib/aimastering/api/access_token_api.rb +70 -0
  48. data/lib/aimastering/api/audio_api.rb +404 -0
  49. data/lib/aimastering/api/config_api.rb +70 -0
  50. data/lib/aimastering/api/external_search_api.rb +84 -0
  51. data/lib/aimastering/api/library_audio_api.rb +416 -0
  52. data/lib/aimastering/api/mastering_api.rb +596 -0
  53. data/lib/aimastering/api/payment_api.rb +263 -0
  54. data/lib/aimastering/api/payment_customer_api.rb +70 -0
  55. data/lib/aimastering/api/plan_api.rb +70 -0
  56. data/lib/aimastering/api/statistics_api.rb +117 -0
  57. data/lib/aimastering/api/subscription_api.rb +311 -0
  58. data/lib/aimastering/api/user_api.rb +125 -0
  59. data/lib/aimastering/api/video_api.rb +295 -0
  60. data/lib/aimastering/api_client.rb +389 -0
  61. data/lib/aimastering/api_error.rb +38 -0
  62. data/lib/aimastering/configuration.rb +209 -0
  63. data/lib/aimastering/models/access_token.rb +188 -0
  64. data/lib/aimastering/models/anonymized_mastering.rb +520 -0
  65. data/lib/aimastering/models/audio.rb +377 -0
  66. data/lib/aimastering/models/audio_analysis.rb +209 -0
  67. data/lib/aimastering/models/audio_download_token.rb +197 -0
  68. data/lib/aimastering/models/config.rb +206 -0
  69. data/lib/aimastering/models/config_auth0.rb +206 -0
  70. data/lib/aimastering/models/config_paypal.rb +197 -0
  71. data/lib/aimastering/models/config_stripe.rb +188 -0
  72. data/lib/aimastering/models/date_time.rb +179 -0
  73. data/lib/aimastering/models/external_search_result.rb +201 -0
  74. data/lib/aimastering/models/external_search_result_itunes.rb +278 -0
  75. data/lib/aimastering/models/external_search_result_youtube.rb +251 -0
  76. data/lib/aimastering/models/jwt.rb +179 -0
  77. data/lib/aimastering/models/kpi.rb +179 -0
  78. data/lib/aimastering/models/library_audio.rb +458 -0
  79. data/lib/aimastering/models/library_audio_analysis.rb +209 -0
  80. data/lib/aimastering/models/library_audio_like.rb +209 -0
  81. data/lib/aimastering/models/mastering.rb +587 -0
  82. data/lib/aimastering/models/payment.rb +275 -0
  83. data/lib/aimastering/models/payment_customer.rb +215 -0
  84. data/lib/aimastering/models/plan.rb +269 -0
  85. data/lib/aimastering/models/subscription.rb +302 -0
  86. data/lib/aimastering/models/user.rb +275 -0
  87. data/lib/aimastering/models/video.rb +233 -0
  88. data/lib/aimastering/models/video_download_token.rb +197 -0
  89. data/lib/aimastering/version.rb +15 -0
  90. data/spec/api/access_token_api_spec.rb +46 -0
  91. data/spec/api/audio_api_spec.rb +118 -0
  92. data/spec/api/config_api_spec.rb +46 -0
  93. data/spec/api/external_search_api_spec.rb +48 -0
  94. data/spec/api/library_audio_api_spec.rb +119 -0
  95. data/spec/api/mastering_api_spec.rb +154 -0
  96. data/spec/api/payment_api_spec.rb +85 -0
  97. data/spec/api/payment_customer_api_spec.rb +46 -0
  98. data/spec/api/plan_api_spec.rb +46 -0
  99. data/spec/api/statistics_api_spec.rb +57 -0
  100. data/spec/api/subscription_api_spec.rb +96 -0
  101. data/spec/api/user_api_spec.rb +59 -0
  102. data/spec/api/video_api_spec.rb +94 -0
  103. data/spec/api_client_spec.rb +226 -0
  104. data/spec/configuration_spec.rb +42 -0
  105. data/spec/models/access_token_spec.rb +42 -0
  106. data/spec/models/anonymized_mastering_spec.rb +192 -0
  107. data/spec/models/audio_analysis_spec.rb +54 -0
  108. data/spec/models/audio_download_token_spec.rb +48 -0
  109. data/spec/models/audio_spec.rb +168 -0
  110. data/spec/models/config_auth0_spec.rb +54 -0
  111. data/spec/models/config_paypal_spec.rb +48 -0
  112. data/spec/models/config_spec.rb +54 -0
  113. data/spec/models/config_stripe_spec.rb +42 -0
  114. data/spec/models/date_time_spec.rb +36 -0
  115. data/spec/models/external_search_result_itunes_spec.rb +102 -0
  116. data/spec/models/external_search_result_spec.rb +48 -0
  117. data/spec/models/external_search_result_youtube_spec.rb +84 -0
  118. data/spec/models/jwt_spec.rb +36 -0
  119. data/spec/models/kpi_spec.rb +36 -0
  120. data/spec/models/library_audio_analysis_spec.rb +54 -0
  121. data/spec/models/library_audio_like_spec.rb +54 -0
  122. data/spec/models/library_audio_spec.rb +222 -0
  123. data/spec/models/mastering_spec.rb +224 -0
  124. data/spec/models/payment_customer_spec.rb +60 -0
  125. data/spec/models/payment_spec.rb +82 -0
  126. data/spec/models/plan_spec.rb +74 -0
  127. data/spec/models/subscription_spec.rb +100 -0
  128. data/spec/models/user_spec.rb +82 -0
  129. data/spec/models/video_download_token_spec.rb +48 -0
  130. data/spec/models/video_spec.rb +72 -0
  131. data/spec/spec_helper.rb +111 -0
  132. metadata +397 -0
@@ -0,0 +1,17 @@
1
+ # Aimastering::Subscription
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | | [optional]
7
+ **user_id** | **Integer** | | [optional]
8
+ **stripe_subscription_id** | **String** | | [optional]
9
+ **current_period_start_at** | **DateTime** | | [optional]
10
+ **current_period_end_at** | **DateTime** | | [optional]
11
+ **canceled** | **BOOLEAN** | | [optional]
12
+ **cancel_at_period_end** | **BOOLEAN** | | [optional]
13
+ **status** | **String** | | [optional]
14
+ **created_at** | **DateTime** | | [optional]
15
+ **updated_at** | **DateTime** | | [optional]
16
+
17
+
@@ -0,0 +1,273 @@
1
+ # Aimastering::SubscriptionApi
2
+
3
+ All URIs are relative to *https://aimastering.com:443/api*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**cancel_subscription**](SubscriptionApi.md#cancel_subscription) | **PUT** /subscriptions/{id}/cancel | Cancel a subscription by id.
8
+ [**cancel_subscription_cancellation**](SubscriptionApi.md#cancel_subscription_cancellation) | **PUT** /subscriptions/{id}/cancel_cancellation | Cancel the subscription cancellation by id.
9
+ [**create_subscription**](SubscriptionApi.md#create_subscription) | **POST** /subscriptions | Create a new subscription.
10
+ [**get_subscription**](SubscriptionApi.md#get_subscription) | **GET** /subscriptions/{id} | Get a subscription by id.
11
+ [**list_subscriptions**](SubscriptionApi.md#list_subscriptions) | **GET** /subscriptions | Get all accessable subscriptions.
12
+
13
+
14
+ # **cancel_subscription**
15
+ > Subscription cancel_subscription(id)
16
+
17
+ Cancel a subscription by id.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'aimastering'
23
+ # setup authorization
24
+ Aimastering.configure do |config|
25
+ # Configure API key authorization: bearer
26
+ config.api_key['Authorization'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Authorization'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = Aimastering::SubscriptionApi.new
32
+
33
+ id = 56 # Integer | Subscription id
34
+
35
+
36
+ begin
37
+ #Cancel a subscription by id.
38
+ result = api_instance.cancel_subscription(id)
39
+ p result
40
+ rescue Aimastering::ApiError => e
41
+ puts "Exception when calling SubscriptionApi->cancel_subscription: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ Name | Type | Description | Notes
48
+ ------------- | ------------- | ------------- | -------------
49
+ **id** | **Integer**| Subscription id |
50
+
51
+ ### Return type
52
+
53
+ [**Subscription**](Subscription.md)
54
+
55
+ ### Authorization
56
+
57
+ [bearer](../README.md#bearer)
58
+
59
+ ### HTTP request headers
60
+
61
+ - **Content-Type**: multipart/form-data
62
+ - **Accept**: application/json
63
+
64
+
65
+
66
+ # **cancel_subscription_cancellation**
67
+ > Subscription cancel_subscription_cancellation(id)
68
+
69
+ Cancel the subscription cancellation by id.
70
+
71
+ ### Example
72
+ ```ruby
73
+ # load the gem
74
+ require 'aimastering'
75
+ # setup authorization
76
+ Aimastering.configure do |config|
77
+ # Configure API key authorization: bearer
78
+ config.api_key['Authorization'] = 'YOUR API KEY'
79
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
80
+ #config.api_key_prefix['Authorization'] = 'Bearer'
81
+ end
82
+
83
+ api_instance = Aimastering::SubscriptionApi.new
84
+
85
+ id = 56 # Integer | Subscription id
86
+
87
+
88
+ begin
89
+ #Cancel the subscription cancellation by id.
90
+ result = api_instance.cancel_subscription_cancellation(id)
91
+ p result
92
+ rescue Aimastering::ApiError => e
93
+ puts "Exception when calling SubscriptionApi->cancel_subscription_cancellation: #{e}"
94
+ end
95
+ ```
96
+
97
+ ### Parameters
98
+
99
+ Name | Type | Description | Notes
100
+ ------------- | ------------- | ------------- | -------------
101
+ **id** | **Integer**| Subscription id |
102
+
103
+ ### Return type
104
+
105
+ [**Subscription**](Subscription.md)
106
+
107
+ ### Authorization
108
+
109
+ [bearer](../README.md#bearer)
110
+
111
+ ### HTTP request headers
112
+
113
+ - **Content-Type**: multipart/form-data
114
+ - **Accept**: application/json
115
+
116
+
117
+
118
+ # **create_subscription**
119
+ > Subscription create_subscription(service, opts)
120
+
121
+ Create a new subscription.
122
+
123
+ ### Example
124
+ ```ruby
125
+ # load the gem
126
+ require 'aimastering'
127
+ # setup authorization
128
+ Aimastering.configure do |config|
129
+ # Configure API key authorization: bearer
130
+ config.api_key['Authorization'] = 'YOUR API KEY'
131
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
132
+ #config.api_key_prefix['Authorization'] = 'Bearer'
133
+ end
134
+
135
+ api_instance = Aimastering::SubscriptionApi.new
136
+
137
+ service = "service_example" # String | This parameter represents the payment message.
138
+
139
+ opts = {
140
+ stripe_plan_id: "stripe_plan_id_example", # String | The Stripe plan id. This parameter is effective only when the service is \"stripe\".
141
+ token: "token_example" # String | This parameter represents the card token. This parameter is effective only when the service is \"stripe\".
142
+ }
143
+
144
+ begin
145
+ #Create a new subscription.
146
+ result = api_instance.create_subscription(service, opts)
147
+ p result
148
+ rescue Aimastering::ApiError => e
149
+ puts "Exception when calling SubscriptionApi->create_subscription: #{e}"
150
+ end
151
+ ```
152
+
153
+ ### Parameters
154
+
155
+ Name | Type | Description | Notes
156
+ ------------- | ------------- | ------------- | -------------
157
+ **service** | **String**| This parameter represents the payment message. |
158
+ **stripe_plan_id** | **String**| The Stripe plan id. This parameter is effective only when the service is \"stripe\". | [optional]
159
+ **token** | **String**| This parameter represents the card token. This parameter is effective only when the service is \"stripe\". | [optional]
160
+
161
+ ### Return type
162
+
163
+ [**Subscription**](Subscription.md)
164
+
165
+ ### Authorization
166
+
167
+ [bearer](../README.md#bearer)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: multipart/form-data
172
+ - **Accept**: application/json
173
+
174
+
175
+
176
+ # **get_subscription**
177
+ > Subscription get_subscription(id)
178
+
179
+ Get a subscription by id.
180
+
181
+ ### Example
182
+ ```ruby
183
+ # load the gem
184
+ require 'aimastering'
185
+ # setup authorization
186
+ Aimastering.configure do |config|
187
+ # Configure API key authorization: bearer
188
+ config.api_key['Authorization'] = 'YOUR API KEY'
189
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
190
+ #config.api_key_prefix['Authorization'] = 'Bearer'
191
+ end
192
+
193
+ api_instance = Aimastering::SubscriptionApi.new
194
+
195
+ id = 56 # Integer | Subscription id
196
+
197
+
198
+ begin
199
+ #Get a subscription by id.
200
+ result = api_instance.get_subscription(id)
201
+ p result
202
+ rescue Aimastering::ApiError => e
203
+ puts "Exception when calling SubscriptionApi->get_subscription: #{e}"
204
+ end
205
+ ```
206
+
207
+ ### Parameters
208
+
209
+ Name | Type | Description | Notes
210
+ ------------- | ------------- | ------------- | -------------
211
+ **id** | **Integer**| Subscription id |
212
+
213
+ ### Return type
214
+
215
+ [**Subscription**](Subscription.md)
216
+
217
+ ### Authorization
218
+
219
+ [bearer](../README.md#bearer)
220
+
221
+ ### HTTP request headers
222
+
223
+ - **Content-Type**: Not defined
224
+ - **Accept**: application/json
225
+
226
+
227
+
228
+ # **list_subscriptions**
229
+ > Array<Subscription> list_subscriptions
230
+
231
+ Get all accessable subscriptions.
232
+
233
+ ### Example
234
+ ```ruby
235
+ # load the gem
236
+ require 'aimastering'
237
+ # setup authorization
238
+ Aimastering.configure do |config|
239
+ # Configure API key authorization: bearer
240
+ config.api_key['Authorization'] = 'YOUR API KEY'
241
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
242
+ #config.api_key_prefix['Authorization'] = 'Bearer'
243
+ end
244
+
245
+ api_instance = Aimastering::SubscriptionApi.new
246
+
247
+ begin
248
+ #Get all accessable subscriptions.
249
+ result = api_instance.list_subscriptions
250
+ p result
251
+ rescue Aimastering::ApiError => e
252
+ puts "Exception when calling SubscriptionApi->list_subscriptions: #{e}"
253
+ end
254
+ ```
255
+
256
+ ### Parameters
257
+ This endpoint does not need any parameter.
258
+
259
+ ### Return type
260
+
261
+ [**Array<Subscription>**](Subscription.md)
262
+
263
+ ### Authorization
264
+
265
+ [bearer](../README.md#bearer)
266
+
267
+ ### HTTP request headers
268
+
269
+ - **Content-Type**: Not defined
270
+ - **Accept**: application/json
271
+
272
+
273
+
@@ -0,0 +1,14 @@
1
+ # Aimastering::User
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | | [optional]
7
+ **agreed_terms_of_service** | **BOOLEAN** | | [optional]
8
+ **auth_id** | **String** | | [optional]
9
+ **auth_provider** | **String** | | [optional]
10
+ **email** | **String** | | [optional]
11
+ **created_at** | **DateTime** | | [optional]
12
+ **updated_at** | **DateTime** | | [optional]
13
+
14
+
@@ -0,0 +1,111 @@
1
+ # Aimastering::UserApi
2
+
3
+ All URIs are relative to *https://aimastering.com:443/api*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**get_self**](UserApi.md#get_self) | **GET** /users/self | Get self user.
8
+ [**update_self**](UserApi.md#update_self) | **PUT** /users/self | Update self user.
9
+
10
+
11
+ # **get_self**
12
+ > User get_self
13
+
14
+ Get self user.
15
+
16
+ ### Example
17
+ ```ruby
18
+ # load the gem
19
+ require 'aimastering'
20
+ # setup authorization
21
+ Aimastering.configure do |config|
22
+ # Configure API key authorization: bearer
23
+ config.api_key['Authorization'] = 'YOUR API KEY'
24
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
25
+ #config.api_key_prefix['Authorization'] = 'Bearer'
26
+ end
27
+
28
+ api_instance = Aimastering::UserApi.new
29
+
30
+ begin
31
+ #Get self user.
32
+ result = api_instance.get_self
33
+ p result
34
+ rescue Aimastering::ApiError => e
35
+ puts "Exception when calling UserApi->get_self: #{e}"
36
+ end
37
+ ```
38
+
39
+ ### Parameters
40
+ This endpoint does not need any parameter.
41
+
42
+ ### Return type
43
+
44
+ [**User**](User.md)
45
+
46
+ ### Authorization
47
+
48
+ [bearer](../README.md#bearer)
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: Not defined
53
+ - **Accept**: application/json
54
+
55
+
56
+
57
+ # **update_self**
58
+ > User update_self(opts)
59
+
60
+ Update self user.
61
+
62
+ ### Example
63
+ ```ruby
64
+ # load the gem
65
+ require 'aimastering'
66
+ # setup authorization
67
+ Aimastering.configure do |config|
68
+ # Configure API key authorization: bearer
69
+ config.api_key['Authorization'] = 'YOUR API KEY'
70
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
71
+ #config.api_key_prefix['Authorization'] = 'Bearer'
72
+ end
73
+
74
+ api_instance = Aimastering::UserApi.new
75
+
76
+ opts = {
77
+ agreed_terms_of_service: true, # BOOLEAN | Whether you agreed terms of service.
78
+ email: "email_example" # String | The email.
79
+ }
80
+
81
+ begin
82
+ #Update self user.
83
+ result = api_instance.update_self(opts)
84
+ p result
85
+ rescue Aimastering::ApiError => e
86
+ puts "Exception when calling UserApi->update_self: #{e}"
87
+ end
88
+ ```
89
+
90
+ ### Parameters
91
+
92
+ Name | Type | Description | Notes
93
+ ------------- | ------------- | ------------- | -------------
94
+ **agreed_terms_of_service** | **BOOLEAN**| Whether you agreed terms of service. | [optional]
95
+ **email** | **String**| The email. | [optional]
96
+
97
+ ### Return type
98
+
99
+ [**User**](User.md)
100
+
101
+ ### Authorization
102
+
103
+ [bearer](../README.md#bearer)
104
+
105
+ ### HTTP request headers
106
+
107
+ - **Content-Type**: multipart/form-data
108
+ - **Accept**: application/json
109
+
110
+
111
+
@@ -0,0 +1,13 @@
1
+ # Aimastering::Video
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **id** | **Integer** | | [optional]
7
+ **file_resource_id** | **Integer** | | [optional]
8
+ **user_id** | **Integer** | | [optional]
9
+ **name** | **String** | | [optional]
10
+ **created_at** | **DateTime** | | [optional]
11
+ **updated_at** | **DateTime** | | [optional]
12
+
13
+
@@ -0,0 +1,267 @@
1
+ # Aimastering::VideoApi
2
+
3
+ All URIs are relative to *https://aimastering.com:443/api*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**download_video**](VideoApi.md#download_video) | **GET** /videos/{id}/download | Download an video data by id.
8
+ [**download_video_by_token**](VideoApi.md#download_video_by_token) | **GET** /videos/download_by_token | Download an video data by video_download_token.
9
+ [**get_video**](VideoApi.md#get_video) | **GET** /videos/{id} | Get an video by id.
10
+ [**get_video_download_token**](VideoApi.md#get_video_download_token) | **GET** /videos/{id}/download_token | Get an video download token by id.
11
+ [**list_videos**](VideoApi.md#list_videos) | **GET** /videos | Get all videos accessable.
12
+
13
+
14
+ # **download_video**
15
+ > String download_video(id)
16
+
17
+ Download an video data by id.
18
+
19
+ ### Example
20
+ ```ruby
21
+ # load the gem
22
+ require 'aimastering'
23
+ # setup authorization
24
+ Aimastering.configure do |config|
25
+ # Configure API key authorization: bearer
26
+ config.api_key['Authorization'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ #config.api_key_prefix['Authorization'] = 'Bearer'
29
+ end
30
+
31
+ api_instance = Aimastering::VideoApi.new
32
+
33
+ id = 56 # Integer | Video id
34
+
35
+
36
+ begin
37
+ #Download an video data by id.
38
+ result = api_instance.download_video(id)
39
+ p result
40
+ rescue Aimastering::ApiError => e
41
+ puts "Exception when calling VideoApi->download_video: #{e}"
42
+ end
43
+ ```
44
+
45
+ ### Parameters
46
+
47
+ Name | Type | Description | Notes
48
+ ------------- | ------------- | ------------- | -------------
49
+ **id** | **Integer**| Video id |
50
+
51
+ ### Return type
52
+
53
+ **String**
54
+
55
+ ### Authorization
56
+
57
+ [bearer](../README.md#bearer)
58
+
59
+ ### HTTP request headers
60
+
61
+ - **Content-Type**: Not defined
62
+ - **Accept**: application/octet-stream
63
+
64
+
65
+
66
+ # **download_video_by_token**
67
+ > String download_video_by_token(download_token)
68
+
69
+ Download an video data by video_download_token.
70
+
71
+ ### Example
72
+ ```ruby
73
+ # load the gem
74
+ require 'aimastering'
75
+ # setup authorization
76
+ Aimastering.configure do |config|
77
+ # Configure API key authorization: bearer
78
+ config.api_key['Authorization'] = 'YOUR API KEY'
79
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
80
+ #config.api_key_prefix['Authorization'] = 'Bearer'
81
+ end
82
+
83
+ api_instance = Aimastering::VideoApi.new
84
+
85
+ download_token = "download_token_example" # String | Video download token
86
+
87
+
88
+ begin
89
+ #Download an video data by video_download_token.
90
+ result = api_instance.download_video_by_token(download_token)
91
+ p result
92
+ rescue Aimastering::ApiError => e
93
+ puts "Exception when calling VideoApi->download_video_by_token: #{e}"
94
+ end
95
+ ```
96
+
97
+ ### Parameters
98
+
99
+ Name | Type | Description | Notes
100
+ ------------- | ------------- | ------------- | -------------
101
+ **download_token** | **String**| Video download token |
102
+
103
+ ### Return type
104
+
105
+ **String**
106
+
107
+ ### Authorization
108
+
109
+ [bearer](../README.md#bearer)
110
+
111
+ ### HTTP request headers
112
+
113
+ - **Content-Type**: Not defined
114
+ - **Accept**: application/octet-stream
115
+
116
+
117
+
118
+ # **get_video**
119
+ > Video get_video(id)
120
+
121
+ Get an video by id.
122
+
123
+ ### Example
124
+ ```ruby
125
+ # load the gem
126
+ require 'aimastering'
127
+ # setup authorization
128
+ Aimastering.configure do |config|
129
+ # Configure API key authorization: bearer
130
+ config.api_key['Authorization'] = 'YOUR API KEY'
131
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
132
+ #config.api_key_prefix['Authorization'] = 'Bearer'
133
+ end
134
+
135
+ api_instance = Aimastering::VideoApi.new
136
+
137
+ id = 56 # Integer | Video id
138
+
139
+
140
+ begin
141
+ #Get an video by id.
142
+ result = api_instance.get_video(id)
143
+ p result
144
+ rescue Aimastering::ApiError => e
145
+ puts "Exception when calling VideoApi->get_video: #{e}"
146
+ end
147
+ ```
148
+
149
+ ### Parameters
150
+
151
+ Name | Type | Description | Notes
152
+ ------------- | ------------- | ------------- | -------------
153
+ **id** | **Integer**| Video id |
154
+
155
+ ### Return type
156
+
157
+ [**Video**](Video.md)
158
+
159
+ ### Authorization
160
+
161
+ [bearer](../README.md#bearer)
162
+
163
+ ### HTTP request headers
164
+
165
+ - **Content-Type**: Not defined
166
+ - **Accept**: application/json
167
+
168
+
169
+
170
+ # **get_video_download_token**
171
+ > VideoDownloadToken get_video_download_token(id)
172
+
173
+ Get an video download token by id.
174
+
175
+ ### Example
176
+ ```ruby
177
+ # load the gem
178
+ require 'aimastering'
179
+ # setup authorization
180
+ Aimastering.configure do |config|
181
+ # Configure API key authorization: bearer
182
+ config.api_key['Authorization'] = 'YOUR API KEY'
183
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
184
+ #config.api_key_prefix['Authorization'] = 'Bearer'
185
+ end
186
+
187
+ api_instance = Aimastering::VideoApi.new
188
+
189
+ id = 56 # Integer | Video id
190
+
191
+
192
+ begin
193
+ #Get an video download token by id.
194
+ result = api_instance.get_video_download_token(id)
195
+ p result
196
+ rescue Aimastering::ApiError => e
197
+ puts "Exception when calling VideoApi->get_video_download_token: #{e}"
198
+ end
199
+ ```
200
+
201
+ ### Parameters
202
+
203
+ Name | Type | Description | Notes
204
+ ------------- | ------------- | ------------- | -------------
205
+ **id** | **Integer**| Video id |
206
+
207
+ ### Return type
208
+
209
+ [**VideoDownloadToken**](VideoDownloadToken.md)
210
+
211
+ ### Authorization
212
+
213
+ [bearer](../README.md#bearer)
214
+
215
+ ### HTTP request headers
216
+
217
+ - **Content-Type**: Not defined
218
+ - **Accept**: application/json
219
+
220
+
221
+
222
+ # **list_videos**
223
+ > Array<Video> list_videos
224
+
225
+ Get all videos accessable.
226
+
227
+ ### Example
228
+ ```ruby
229
+ # load the gem
230
+ require 'aimastering'
231
+ # setup authorization
232
+ Aimastering.configure do |config|
233
+ # Configure API key authorization: bearer
234
+ config.api_key['Authorization'] = 'YOUR API KEY'
235
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
236
+ #config.api_key_prefix['Authorization'] = 'Bearer'
237
+ end
238
+
239
+ api_instance = Aimastering::VideoApi.new
240
+
241
+ begin
242
+ #Get all videos accessable.
243
+ result = api_instance.list_videos
244
+ p result
245
+ rescue Aimastering::ApiError => e
246
+ puts "Exception when calling VideoApi->list_videos: #{e}"
247
+ end
248
+ ```
249
+
250
+ ### Parameters
251
+ This endpoint does not need any parameter.
252
+
253
+ ### Return type
254
+
255
+ [**Array<Video>**](Video.md)
256
+
257
+ ### Authorization
258
+
259
+ [bearer](../README.md#bearer)
260
+
261
+ ### HTTP request headers
262
+
263
+ - **Content-Type**: Not defined
264
+ - **Accept**: application/json
265
+
266
+
267
+