Class: MusicubeApiClientRuby::UserApi

Inherits:
Object
  • Object
show all
Defined in:
lib/musicube_api_client_ruby/api/user_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UserApi

Returns a new instance of UserApi.



19
20
21
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_user_referrer(save_referrer_dto, opts = {}) ⇒ Object

Parameters:

  • save_referrer_dto (SaveReferrerDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


25
26
27
28
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 25

def create_user_referrer(save_referrer_dto, opts = {})
  data, _status_code, _headers = create_user_referrer_with_http_info(save_referrer_dto, opts)
  data
end

#create_user_referrer_with_http_info(save_referrer_dto, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Returns Object data, response status code and response headers.

Parameters:

  • save_referrer_dto (SaveReferrerDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 33

def create_user_referrer_with_http_info(save_referrer_dto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.create_user_referrer ...'
  end
  # verify the required parameter 'save_referrer_dto' is set
  if @api_client.config.client_side_validation && save_referrer_dto.nil?
    fail ArgumentError, "Missing the required parameter 'save_referrer_dto' when calling UserApi.create_user_referrer"
  end
  # resource path
  local_var_path = '/api/v1/user/referrers/new'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(save_referrer_dto)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.create_user_referrer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#create_user_referrer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_user_file(object_key, opts = {}) ⇒ Object

Delete file.

Parameters:

  • object_key (String)

    ObjectKey of the file that should be deleted.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


90
91
92
93
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 90

def delete_user_file(object_key, opts = {})
  data, _status_code, _headers = delete_user_file_with_http_info(object_key, opts)
  data
end

#delete_user_file_with_http_info(object_key, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Delete file.

Parameters:

  • object_key (String)

    ObjectKey of the file that should be deleted.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
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
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 99

def delete_user_file_with_http_info(object_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.delete_user_file ...'
  end
  # verify the required parameter 'object_key' is set
  if @api_client.config.client_side_validation && object_key.nil?
    fail ArgumentError, "Missing the required parameter 'object_key' when calling UserApi.delete_user_file"
  end
  # resource path
  local_var_path = '/api/v1/user/file/{objectKey}'.sub('{' + 'objectKey' + '}', CGI.escape(object_key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json', 'application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.delete_user_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#delete_user_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#edit_me(save_user_dto, opts = {}) ⇒ Object

Edit details for a logged-in user

Parameters:

  • save_user_dto (SaveUserDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


151
152
153
154
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 151

def edit_me(save_user_dto, opts = {})
  data, _status_code, _headers = edit_me_with_http_info(save_user_dto, opts)
  data
end

#edit_me_with_http_info(save_user_dto, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Edit details for a logged-in user

Parameters:

  • save_user_dto (SaveUserDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



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
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 160

def edit_me_with_http_info(save_user_dto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.edit_me ...'
  end
  # verify the required parameter 'save_user_dto' is set
  if @api_client.config.client_side_validation && save_user_dto.nil?
    fail ArgumentError, "Missing the required parameter 'save_user_dto' when calling UserApi.edit_me"
  end
  # resource path
  local_var_path = '/api/v1/user/me'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(save_user_dto)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.edit_me",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#edit_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#forgot_password(forgot_password_dto, opts = {}) ⇒ Object

Send a password reset email

Parameters:

  • forgot_password_dto (ForgotPasswordDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


217
218
219
220
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 217

def forgot_password(forgot_password_dto, opts = {})
  data, _status_code, _headers = forgot_password_with_http_info(forgot_password_dto, opts)
  data
end

#forgot_password_with_http_info(forgot_password_dto, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Send a password reset email

Parameters:

  • forgot_password_dto (ForgotPasswordDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



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
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 226

def forgot_password_with_http_info(forgot_password_dto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.forgot_password ...'
  end
  # verify the required parameter 'forgot_password_dto' is set
  if @api_client.config.client_side_validation && forgot_password_dto.nil?
    fail ArgumentError, "Missing the required parameter 'forgot_password_dto' when calling UserApi.forgot_password"
  end
  # resource path
  local_var_path = '/api/v1/user/forgot-password'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json', 'application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(forgot_password_dto)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.forgot_password",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#forgot_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#initiate_user_file_upload(name, folder, opts = {}) ⇒ InitPutRecordingAudioDTO

Initialize a file upload. Responds with an URL where the file can be uploaded.

Parameters:

  • name (String)

    The Name of the file that will be uploaded

  • folder (String)

    The Name of the folder that the file will be placed in

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



285
286
287
288
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 285

def initiate_user_file_upload(name, folder, opts = {})
  data, _status_code, _headers = initiate_user_file_upload_with_http_info(name, folder, opts)
  data
end

#initiate_user_file_upload_with_http_info(name, folder, opts = {}) ⇒ Array<(InitPutRecordingAudioDTO, Integer, Hash)>

Initialize a file upload. Responds with an URL where the file can be uploaded.

Parameters:

  • name (String)

    The Name of the file that will be uploaded

  • folder (String)

    The Name of the folder that the file will be placed in

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(InitPutRecordingAudioDTO, Integer, Hash)>)

    InitPutRecordingAudioDTO data, response status code and response headers



296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 296

def initiate_user_file_upload_with_http_info(name, folder, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.initiate_user_file_upload ...'
  end
  # verify the required parameter 'name' is set
  if @api_client.config.client_side_validation && name.nil?
    fail ArgumentError, "Missing the required parameter 'name' when calling UserApi.initiate_user_file_upload"
  end
  # verify the required parameter 'folder' is set
  if @api_client.config.client_side_validation && folder.nil?
    fail ArgumentError, "Missing the required parameter 'folder' when calling UserApi.initiate_user_file_upload"
  end
  # resource path
  local_var_path = '/api/v1/user/file/{name}/initUpload'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'folder'] = folder

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'file_upload_dto'])

  # return_type
  return_type = opts[:debug_return_type] || 'InitPutRecordingAudioDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.initiate_user_file_upload",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#initiate_user_file_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#login(login_dto, opts = {}) ⇒ JwtTokenDTO

Login to generate a bearer token.

Parameters:

  • login_dto (LoginDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



358
359
360
361
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 358

def (, opts = {})
  data, _status_code, _headers = (, opts)
  data
end

#login_with_http_info(login_dto, opts = {}) ⇒ Array<(JwtTokenDTO, Integer, Hash)>

Login to generate a bearer token.

Parameters:

  • login_dto (LoginDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(JwtTokenDTO, Integer, Hash)>)

    JwtTokenDTO data, response status code and response headers



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 367

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.login ...'
  end
  # verify the required parameter 'login_dto' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_dto' when calling UserApi.login"
  end
  # resource path
  local_var_path = '/api/v1/user/login'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body()

  # return_type
  return_type = opts[:debug_return_type] || 'JwtTokenDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.login",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#login\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#me(opts = {}) ⇒ UserDTO

Details for a logged-in user

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



423
424
425
426
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 423

def me(opts = {})
  data, _status_code, _headers = me_with_http_info(opts)
  data
end

#me_with_http_info(opts = {}) ⇒ Array<(UserDTO, Integer, Hash)>

Details for a logged-in user

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(UserDTO, Integer, Hash)>)

    UserDTO data, response status code and response headers



431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 431

def me_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.me ...'
  end
  # resource path
  local_var_path = '/api/v1/user/me'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'UserDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.me",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#recordings_by_folder_with_taggrams(folder_name, opts = {}) ⇒ Array<RecordingMinimalWithTaggramsDTO>

Timeseries of AI generated moods, musical features and more for recordings in your folder.

Parameters:

  • folder_name (String)

    Folder name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :category_name (String)

    Show only taggrams for one category.

  • :tag_name (String)

    Show only taggrams for one tag.

  • :genre_name (String)

    Show only taggrams for one genre.

  • :from_timestamp (Float)

    Show only taggrams data starting from from this timestamp in seconds.

  • :fill_with_zero (Boolean)

    If set to true, empty timeseries are filled with timeseries of 0.0 values.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 20)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:



487
488
489
490
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 487

def recordings_by_folder_with_taggrams(folder_name, opts = {})
  data, _status_code, _headers = recordings_by_folder_with_taggrams_with_http_info(folder_name, opts)
  data
end

#recordings_by_folder_with_taggrams_with_http_info(folder_name, opts = {}) ⇒ Array<(Array<RecordingMinimalWithTaggramsDTO>, Integer, Hash)>

Timeseries of AI generated moods, musical features and more for recordings in your folder.

Parameters:

  • folder_name (String)

    Folder name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :category_name (String)

    Show only taggrams for one category.

  • :tag_name (String)

    Show only taggrams for one tag.

  • :genre_name (String)

    Show only taggrams for one genre.

  • :from_timestamp (Float)

    Show only taggrams data starting from from this timestamp in seconds.

  • :fill_with_zero (Boolean)

    If set to true, empty timeseries are filled with timeseries of 0.0 values.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 20)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:

  • (Array<(Array<RecordingMinimalWithTaggramsDTO>, Integer, Hash)>)

    Array<RecordingMinimalWithTaggramsDTO> data, response status code and response headers



504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 504

def recordings_by_folder_with_taggrams_with_http_info(folder_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.recordings_by_folder_with_taggrams ...'
  end
  # verify the required parameter 'folder_name' is set
  if @api_client.config.client_side_validation && folder_name.nil?
    fail ArgumentError, "Missing the required parameter 'folder_name' when calling UserApi.recordings_by_folder_with_taggrams"
  end
  allowable_values = ["instrument", "vocals", "energy", "soundGeneration", "rhythm", "songRating", "performanceRating", "productionRating", "moodCluster", "tonality", "arousal", "valence", "pleasantness", "engagement", "timbre", "roughness", "harmony", "texture", "groovyness", "space", "audienceAge", "audienceRegion", "audienceGender", "originRegion", "originDecade", "languageOfPerformance", "level1Genre", "level2Genre"]
  if @api_client.config.client_side_validation && opts[:'category_name'] && !allowable_values.include?(opts[:'category_name'])
    fail ArgumentError, "invalid value for \"category_name\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/v1/user/folder/{folderName}/taggrams'.sub('{' + 'folderName' + '}', CGI.escape(folder_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'categoryName'] = opts[:'category_name'] if !opts[:'category_name'].nil?
  query_params[:'tagName'] = opts[:'tag_name'] if !opts[:'tag_name'].nil?
  query_params[:'genreName'] = opts[:'genre_name'] if !opts[:'genre_name'].nil?
  query_params[:'fromTimestamp'] = opts[:'from_timestamp'] if !opts[:'from_timestamp'].nil?
  query_params[:'fillWithZero'] = opts[:'fill_with_zero'] if !opts[:'fill_with_zero'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RecordingMinimalWithTaggramsDTO>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.recordings_by_folder_with_taggrams",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#recordings_by_folder_with_taggrams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#recordings_by_folder_with_tagstrengths(folder_name, opts = {}) ⇒ Array<RecordingMinimalWithTagstrengthsDTO>

Strengths as numerical representations for AI generated moods, musical features and more for recordings in your folder.

Parameters:

  • folder_name (String)

    Folder name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :category_name (String)

    Show only taggrams for one category.

  • :tag_name (String)

    Show only taggrams for one tag.

  • :genre_name (String)

    Show only taggrams for one genre.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 20)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:



574
575
576
577
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 574

def recordings_by_folder_with_tagstrengths(folder_name, opts = {})
  data, _status_code, _headers = recordings_by_folder_with_tagstrengths_with_http_info(folder_name, opts)
  data
end

#recordings_by_folder_with_tagstrengths_with_http_info(folder_name, opts = {}) ⇒ Array<(Array<RecordingMinimalWithTagstrengthsDTO>, Integer, Hash)>

Strengths as numerical representations for AI generated moods, musical features and more for recordings in your folder.

Parameters:

  • folder_name (String)

    Folder name

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :category_name (String)

    Show only taggrams for one category.

  • :tag_name (String)

    Show only taggrams for one tag.

  • :genre_name (String)

    Show only taggrams for one genre.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 20)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:



589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 589

def recordings_by_folder_with_tagstrengths_with_http_info(folder_name, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.recordings_by_folder_with_tagstrengths ...'
  end
  # verify the required parameter 'folder_name' is set
  if @api_client.config.client_side_validation && folder_name.nil?
    fail ArgumentError, "Missing the required parameter 'folder_name' when calling UserApi.recordings_by_folder_with_tagstrengths"
  end
  allowable_values = ["instrument", "vocals", "energy", "soundGeneration", "rhythm", "songRating", "performanceRating", "productionRating", "moodCluster", "tonality", "arousal", "valence", "pleasantness", "engagement", "timbre", "roughness", "harmony", "texture", "groovyness", "space", "audienceAge", "audienceRegion", "audienceGender", "originRegion", "originDecade", "languageOfPerformance", "level1Genre", "level2Genre"]
  if @api_client.config.client_side_validation && opts[:'category_name'] && !allowable_values.include?(opts[:'category_name'])
    fail ArgumentError, "invalid value for \"category_name\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/v1/user/folder/{folderName}/tagstrengths'.sub('{' + 'folderName' + '}', CGI.escape(folder_name.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'categoryName'] = opts[:'category_name'] if !opts[:'category_name'].nil?
  query_params[:'tagName'] = opts[:'tag_name'] if !opts[:'tag_name'].nil?
  query_params[:'genreName'] = opts[:'genre_name'] if !opts[:'genre_name'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<RecordingMinimalWithTagstrengthsDTO>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.recordings_by_folder_with_tagstrengths",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#recordings_by_folder_with_tagstrengths\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#save_playlist(opts = {}) ⇒ FileListDTO

List, search and create playlist of your own files.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)

    Search for a ISRC

  • :contributor (String)

    Search for a name that was involved as any contributor.

  • :main_artist (String)

    Search for a main artist.

  • :composer (String)

    Search for a composer.

  • :title (String)

    Search for a title.

  • :language (String)

    Search for a language of the lyrics.

  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :origin_decade (String)
  • :curateability (String)
  • :use_case (String)
  • :channel_suitability (String)
  • :similar_to_recording (String)
  • :create_playlist_with_name (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)

    Search for a minimal bpm.

  • :bpm_max (Integer)

    Search for a maximal bpm.

  • :name (String)

    Search for a file name.

  • :folder (String)

    Search for a folder.

  • :extension (String)

    Search for a file extension.

  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)

    Search for a fingerprint status.

  • :inference_status (String)

    Search for a inference status.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 100)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:



710
711
712
713
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 710

def save_playlist(opts = {})
  data, _status_code, _headers = save_playlist_with_http_info(opts)
  data
end

#save_playlist_with_http_info(opts = {}) ⇒ Array<(FileListDTO, Integer, Hash)>

List, search and create playlist of your own files.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)

    Search for a ISRC

  • :contributor (String)

    Search for a name that was involved as any contributor.

  • :main_artist (String)

    Search for a main artist.

  • :composer (String)

    Search for a composer.

  • :title (String)

    Search for a title.

  • :language (String)

    Search for a language of the lyrics.

  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :origin_decade (String)
  • :curateability (String)
  • :use_case (String)
  • :channel_suitability (String)
  • :similar_to_recording (String)
  • :create_playlist_with_name (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)

    Search for a minimal bpm.

  • :bpm_max (Integer)

    Search for a maximal bpm.

  • :name (String)

    Search for a file name.

  • :folder (String)

    Search for a folder.

  • :extension (String)

    Search for a file extension.

  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)

    Search for a fingerprint status.

  • :inference_status (String)

    Search for a inference status.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 100)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:

  • (Array<(FileListDTO, Integer, Hash)>)

    FileListDTO data, response status code and response headers



778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 778

def save_playlist_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.save_playlist ...'
  end
  allowable_values = ["en", "es", "fr", "de", "jp", "cn", "IT", "RU"]
  if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
    fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_mood_cluster'] && !allowable_values.include?(opts[:'primary_mood_cluster'])
    fail ArgumentError, "invalid value for \"primary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'secondary_mood_cluster'] && !allowable_values.include?(opts[:'secondary_mood_cluster'])
    fail ArgumentError, "invalid value for \"secondary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'tertiary_mood_cluster'] && !allowable_values.include?(opts[:'tertiary_mood_cluster'])
    fail ArgumentError, "invalid value for \"tertiary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"]
  if @api_client.config.client_side_validation && opts[:'valence'] && !allowable_values.include?(opts[:'valence'])
    fail ArgumentError, "invalid value for \"valence\", must be one of #{allowable_values}"
  end
  allowable_values = ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"]
  if @api_client.config.client_side_validation && opts[:'arousal'] && !allowable_values.include?(opts[:'arousal'])
    fail ArgumentError, "invalid value for \"arousal\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"]
  if @api_client.config.client_side_validation && opts[:'pleasantness'] && !allowable_values.include?(opts[:'pleasantness'])
    fail ArgumentError, "invalid value for \"pleasantness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"]
  if @api_client.config.client_side_validation && opts[:'engagement'] && !allowable_values.include?(opts[:'engagement'])
    fail ArgumentError, "invalid value for \"engagement\", must be one of #{allowable_values}"
  end
  allowable_values = ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"]
  if @api_client.config.client_side_validation && opts[:'vocals'] && !allowable_values.include?(opts[:'vocals'])
    fail ArgumentError, "invalid value for \"vocals\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'dominant_instrument'] && !allowable_values.include?(opts[:'dominant_instrument'])
    fail ArgumentError, "invalid value for \"dominant_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'secondary_instrument'] && !allowable_values.include?(opts[:'secondary_instrument'])
    fail ArgumentError, "invalid value for \"secondary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'tertiary_instrument'] && !allowable_values.include?(opts[:'tertiary_instrument'])
    fail ArgumentError, "invalid value for \"tertiary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"]
  if @api_client.config.client_side_validation && opts[:'energy'] && !allowable_values.include?(opts[:'energy'])
    fail ArgumentError, "invalid value for \"energy\", must be one of #{allowable_values}"
  end
  allowable_values = ["acoustic", "electric", "electronic", "mixed sound generation"]
  if @api_client.config.client_side_validation && opts[:'sound_generation'] && !allowable_values.include?(opts[:'sound_generation'])
    fail ArgumentError, "invalid value for \"sound_generation\", must be one of #{allowable_values}"
  end
  allowable_values = ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"]
  if @api_client.config.client_side_validation && opts[:'tempo'] && !allowable_values.include?(opts[:'tempo'])
    fail ArgumentError, "invalid value for \"tempo\", must be one of #{allowable_values}"
  end
  allowable_values = ["major key", "minor key", "neutral key"]
  if @api_client.config.client_side_validation && opts[:'scale'] && !allowable_values.include?(opts[:'scale'])
    fail ArgumentError, "invalid value for \"scale\", must be one of #{allowable_values}"
  end
  allowable_values = ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"]
  if @api_client.config.client_side_validation && opts[:'rhythm'] && !allowable_values.include?(opts[:'rhythm'])
    fail ArgumentError, "invalid value for \"rhythm\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_sound_character'] && !allowable_values.include?(opts[:'primary_sound_character'])
    fail ArgumentError, "invalid value for \"primary_sound_character\", must be one of #{allowable_values}"
  end
  allowable_values = ["very warm", "warm", "moderate timbre", "bright", "very bright"]
  if @api_client.config.client_side_validation && opts[:'timbre'] && !allowable_values.include?(opts[:'timbre'])
    fail ArgumentError, "invalid value for \"timbre\", must be one of #{allowable_values}"
  end
  allowable_values = ["very clear", "clear", "moderate roughness", "distorted", "very distorted"]
  if @api_client.config.client_side_validation && opts[:'roughness'] && !allowable_values.include?(opts[:'roughness'])
    fail ArgumentError, "invalid value for \"roughness\", must be one of #{allowable_values}"
  end
  allowable_values = ["monotonous", "moderate melodiousness", "melodious", "atonal"]
  if @api_client.config.client_side_validation && opts[:'tonality'] && !allowable_values.include?(opts[:'tonality'])
    fail ArgumentError, "invalid value for \"tonality\", must be one of #{allowable_values}"
  end
  allowable_values = ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"]
  if @api_client.config.client_side_validation && opts[:'harmony'] && !allowable_values.include?(opts[:'harmony'])
    fail ArgumentError, "invalid value for \"harmony\", must be one of #{allowable_values}"
  end
  allowable_values = ["very thin", "thin", "moderate texture", "full", "very full"]
  if @api_client.config.client_side_validation && opts[:'texture'] && !allowable_values.include?(opts[:'texture'])
    fail ArgumentError, "invalid value for \"texture\", must be one of #{allowable_values}"
  end
  allowable_values = ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"]
  if @api_client.config.client_side_validation && opts[:'groovyness'] && !allowable_values.include?(opts[:'groovyness'])
    fail ArgumentError, "invalid value for \"groovyness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very compact", "compact", "moderate space", "wide", "very wide"]
  if @api_client.config.client_side_validation && opts[:'space'] && !allowable_values.include?(opts[:'space'])
    fail ArgumentError, "invalid value for \"space\", must be one of #{allowable_values}"
  end
  allowable_values = ["low production quality", "medium production quality", "high production quality"]
  if @api_client.config.client_side_validation && opts[:'production_rating'] && !allowable_values.include?(opts[:'production_rating'])
    fail ArgumentError, "invalid value for \"production_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low performance quality", "medium performance quality", "high performance quality"]
  if @api_client.config.client_side_validation && opts[:'performance_rating'] && !allowable_values.include?(opts[:'performance_rating'])
    fail ArgumentError, "invalid value for \"performance_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low song quality", "medium song quality", "high song quality"]
  if @api_client.config.client_side_validation && opts[:'song_rating'] && !allowable_values.include?(opts[:'song_rating'])
    fail ArgumentError, "invalid value for \"song_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"]
  if @api_client.config.client_side_validation && opts[:'audience_age'] && !allowable_values.include?(opts[:'audience_age'])
    fail ArgumentError, "invalid value for \"audience_age\", must be one of #{allowable_values}"
  end
  allowable_values = ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"]
  if @api_client.config.client_side_validation && opts[:'audience_region'] && !allowable_values.include?(opts[:'audience_region'])
    fail ArgumentError, "invalid value for \"audience_region\", must be one of #{allowable_values}"
  end
  allowable_values = ["male", "female"]
  if @api_client.config.client_side_validation && opts[:'audience_gender'] && !allowable_values.include?(opts[:'audience_gender'])
    fail ArgumentError, "invalid value for \"audience_gender\", must be one of #{allowable_values}"
  end
  allowable_values = ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"]
  if @api_client.config.client_side_validation && opts[:'origin_decade'] && !allowable_values.include?(opts[:'origin_decade'])
    fail ArgumentError, "invalid value for \"origin_decade\", must be one of #{allowable_values}"
  end
  allowable_values = ["curateable", "uncurateable"]
  if @api_client.config.client_side_validation && opts[:'curateability'] && !allowable_values.include?(opts[:'curateability'])
    fail ArgumentError, "invalid value for \"curateability\", must be one of #{allowable_values}"
  end
  allowable_values = ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax"]
  if @api_client.config.client_side_validation && opts[:'use_case'] && !allowable_values.include?(opts[:'use_case'])
    fail ArgumentError, "invalid value for \"use_case\", must be one of #{allowable_values}"
  end
  allowable_values = ["Spotify", "TikTok", "Unfitting", "YouTube"]
  if @api_client.config.client_side_validation && opts[:'channel_suitability'] && !allowable_values.include?(opts[:'channel_suitability'])
    fail ArgumentError, "invalid value for \"channel_suitability\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UserApi.save_playlist, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UserApi.save_playlist, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/api/v1/user/savePlaylist'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ISRC'] = opts[:'isrc'] if !opts[:'isrc'].nil?
  query_params[:'contributor'] = opts[:'contributor'] if !opts[:'contributor'].nil?
  query_params[:'mainArtist'] = opts[:'main_artist'] if !opts[:'main_artist'].nil?
  query_params[:'composer'] = opts[:'composer'] if !opts[:'composer'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'genreNames'] = @api_client.build_collection_param(opts[:'genre_names'], :multi) if !opts[:'genre_names'].nil?
  query_params[:'tagNames'] = @api_client.build_collection_param(opts[:'tag_names'], :multi) if !opts[:'tag_names'].nil?
  query_params[:'releaseDate'] = opts[:'release_date'] if !opts[:'release_date'].nil?
  query_params[:'primaryMoodCluster'] = opts[:'primary_mood_cluster'] if !opts[:'primary_mood_cluster'].nil?
  query_params[:'secondaryMoodCluster'] = opts[:'secondary_mood_cluster'] if !opts[:'secondary_mood_cluster'].nil?
  query_params[:'tertiaryMoodCluster'] = opts[:'tertiary_mood_cluster'] if !opts[:'tertiary_mood_cluster'].nil?
  query_params[:'valence'] = opts[:'valence'] if !opts[:'valence'].nil?
  query_params[:'arousal'] = opts[:'arousal'] if !opts[:'arousal'].nil?
  query_params[:'pleasantness'] = opts[:'pleasantness'] if !opts[:'pleasantness'].nil?
  query_params[:'engagement'] = opts[:'engagement'] if !opts[:'engagement'].nil?
  query_params[:'vocals'] = opts[:'vocals'] if !opts[:'vocals'].nil?
  query_params[:'dominantInstrument'] = opts[:'dominant_instrument'] if !opts[:'dominant_instrument'].nil?
  query_params[:'secondaryInstrument'] = opts[:'secondary_instrument'] if !opts[:'secondary_instrument'].nil?
  query_params[:'tertiaryInstrument'] = opts[:'tertiary_instrument'] if !opts[:'tertiary_instrument'].nil?
  query_params[:'energy'] = opts[:'energy'] if !opts[:'energy'].nil?
  query_params[:'soundGeneration'] = opts[:'sound_generation'] if !opts[:'sound_generation'].nil?
  query_params[:'tempo'] = opts[:'tempo'] if !opts[:'tempo'].nil?
  query_params[:'scale'] = opts[:'scale'] if !opts[:'scale'].nil?
  query_params[:'rhythm'] = opts[:'rhythm'] if !opts[:'rhythm'].nil?
  query_params[:'primarySoundCharacter'] = opts[:'primary_sound_character'] if !opts[:'primary_sound_character'].nil?
  query_params[:'timbre'] = opts[:'timbre'] if !opts[:'timbre'].nil?
  query_params[:'roughness'] = opts[:'roughness'] if !opts[:'roughness'].nil?
  query_params[:'tonality'] = opts[:'tonality'] if !opts[:'tonality'].nil?
  query_params[:'harmony'] = opts[:'harmony'] if !opts[:'harmony'].nil?
  query_params[:'texture'] = opts[:'texture'] if !opts[:'texture'].nil?
  query_params[:'groovyness'] = opts[:'groovyness'] if !opts[:'groovyness'].nil?
  query_params[:'space'] = opts[:'space'] if !opts[:'space'].nil?
  query_params[:'productionRating'] = opts[:'production_rating'] if !opts[:'production_rating'].nil?
  query_params[:'performanceRating'] = opts[:'performance_rating'] if !opts[:'performance_rating'].nil?
  query_params[:'songRating'] = opts[:'song_rating'] if !opts[:'song_rating'].nil?
  query_params[:'audienceAge'] = opts[:'audience_age'] if !opts[:'audience_age'].nil?
  query_params[:'audienceRegion'] = opts[:'audience_region'] if !opts[:'audience_region'].nil?
  query_params[:'audienceGender'] = opts[:'audience_gender'] if !opts[:'audience_gender'].nil?
  query_params[:'originDecade'] = opts[:'origin_decade'] if !opts[:'origin_decade'].nil?
  query_params[:'curateability'] = opts[:'curateability'] if !opts[:'curateability'].nil?
  query_params[:'useCase'] = opts[:'use_case'] if !opts[:'use_case'].nil?
  query_params[:'channelSuitability'] = opts[:'channel_suitability'] if !opts[:'channel_suitability'].nil?
  query_params[:'similarToRecording'] = opts[:'similar_to_recording'] if !opts[:'similar_to_recording'].nil?
  query_params[:'createPlaylistWithName'] = opts[:'create_playlist_with_name'] if !opts[:'create_playlist_with_name'].nil?
  query_params[:'songtradrTrackId'] = opts[:'songtradr_track_id'] if !opts[:'songtradr_track_id'].nil?
  query_params[:'usageName'] = opts[:'usage_name'] if !opts[:'usage_name'].nil?
  query_params[:'bpmMin'] = opts[:'bpm_min'] if !opts[:'bpm_min'].nil?
  query_params[:'bpmMax'] = opts[:'bpm_max'] if !opts[:'bpm_max'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil?
  query_params[:'uploadEndTime'] = opts[:'upload_end_time'] if !opts[:'upload_end_time'].nil?
  query_params[:'minUploadEndTime'] = opts[:'min_upload_end_time'] if !opts[:'min_upload_end_time'].nil?
  query_params[:'maxUploadEndTime'] = opts[:'max_upload_end_time'] if !opts[:'max_upload_end_time'].nil?
  query_params[:'fingerprintStatus'] = opts[:'fingerprint_status'] if !opts[:'fingerprint_status'].nil?
  query_params[:'inferenceStatus'] = opts[:'inference_status'] if !opts[:'inference_status'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FileListDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.save_playlist",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#save_playlist\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#sign_up(save_user_dto, opts = {}) ⇒ SignUpDTO

Sign up a new user.

Parameters:

  • save_user_dto (SaveUserDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1034
1035
1036
1037
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1034

def (save_user_dto, opts = {})
  data, _status_code, _headers = (save_user_dto, opts)
  data
end

#sign_up_with_http_info(save_user_dto, opts = {}) ⇒ Array<(SignUpDTO, Integer, Hash)>

Sign up a new user.

Parameters:

  • save_user_dto (SaveUserDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(SignUpDTO, Integer, Hash)>)

    SignUpDTO data, response status code and response headers



1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1043

def (save_user_dto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.sign_up ...'
  end
  # verify the required parameter 'save_user_dto' is set
  if @api_client.config.client_side_validation && save_user_dto.nil?
    fail ArgumentError, "Missing the required parameter 'save_user_dto' when calling UserApi.sign_up"
  end
  # resource path
  local_var_path = '/api/v1/user/sign-up'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(save_user_dto)

  # return_type
  return_type = opts[:debug_return_type] || 'SignUpDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.sign_up",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#sign_up\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#token(token_request, opts = {}) ⇒ JwtTokenDTO

Generates a new JWT token for the given refresh token

Parameters:

  • token_request (TokenRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1100
1101
1102
1103
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1100

def token(token_request, opts = {})
  data, _status_code, _headers = token_with_http_info(token_request, opts)
  data
end

#token_with_http_info(token_request, opts = {}) ⇒ Array<(JwtTokenDTO, Integer, Hash)>

Generates a new JWT token for the given refresh token

Parameters:

  • token_request (TokenRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(JwtTokenDTO, Integer, Hash)>)

    JwtTokenDTO data, response status code and response headers



1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1109

def token_with_http_info(token_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.token ...'
  end
  # verify the required parameter 'token_request' is set
  if @api_client.config.client_side_validation && token_request.nil?
    fail ArgumentError, "Missing the required parameter 'token_request' when calling UserApi.token"
  end
  # resource path
  local_var_path = '/api/v1/user/token'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(token_request)

  # return_type
  return_type = opts[:debug_return_type] || 'JwtTokenDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_password(update_password_dto, opts = {}) ⇒ Object

Update password by using the password reset token

Parameters:

  • update_password_dto (UpdatePasswordDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


1166
1167
1168
1169
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1166

def update_password(update_password_dto, opts = {})
  data, _status_code, _headers = update_password_with_http_info(update_password_dto, opts)
  data
end

#update_password_with_http_info(update_password_dto, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Update password by using the password reset token

Parameters:

  • update_password_dto (UpdatePasswordDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1175

def update_password_with_http_info(update_password_dto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.update_password ...'
  end
  # verify the required parameter 'update_password_dto' is set
  if @api_client.config.client_side_validation && update_password_dto.nil?
    fail ArgumentError, "Missing the required parameter 'update_password_dto' when calling UserApi.update_password"
  end
  # resource path
  local_var_path = '/api/v1/user/update-password'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/hal+json', 'application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_password_dto)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.update_password",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#update_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user_file_recording(object_key, save_file_recording_dto, opts = {}) ⇒ Object

Create and edit metadata of your files.

Parameters:

  • object_key (String)

    ObjectKey of the file that should be edited.

  • save_file_recording_dto (SaveFileRecordingDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


1233
1234
1235
1236
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1233

def update_user_file_recording(object_key, save_file_recording_dto, opts = {})
  data, _status_code, _headers = update_user_file_recording_with_http_info(object_key, save_file_recording_dto, opts)
  data
end

#update_user_file_recording_with_http_info(object_key, save_file_recording_dto, opts = {}) ⇒ Array<(Object, Integer, Hash)>

Create and edit metadata of your files.

Parameters:

  • object_key (String)

    ObjectKey of the file that should be edited.

  • save_file_recording_dto (SaveFileRecordingDTO)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Integer, Hash)>)

    Object data, response status code and response headers



1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1243

def update_user_file_recording_with_http_info(object_key, save_file_recording_dto, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.update_user_file_recording ...'
  end
  # verify the required parameter 'object_key' is set
  if @api_client.config.client_side_validation && object_key.nil?
    fail ArgumentError, "Missing the required parameter 'object_key' when calling UserApi.update_user_file_recording"
  end
  # verify the required parameter 'save_file_recording_dto' is set
  if @api_client.config.client_side_validation && save_file_recording_dto.nil?
    fail ArgumentError, "Missing the required parameter 'save_file_recording_dto' when calling UserApi.update_user_file_recording"
  end
  # resource path
  local_var_path = '/api/v1/user/file/{objectKey}'.sub('{' + 'objectKey' + '}', CGI.escape(object_key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(save_file_recording_dto)

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.update_user_file_recording",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#update_user_file_recording\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#user_file(object_key, opts = {}) ⇒ FileWIthUrlDTO

Details and a download link for a file.

Parameters:

  • object_key (String)

    ObjectKey of the file that should be edited.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1304
1305
1306
1307
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1304

def user_file(object_key, opts = {})
  data, _status_code, _headers = user_file_with_http_info(object_key, opts)
  data
end

#user_file_with_http_info(object_key, opts = {}) ⇒ Array<(FileWIthUrlDTO, Integer, Hash)>

Details and a download link for a file.

Parameters:

  • object_key (String)

    ObjectKey of the file that should be edited.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(FileWIthUrlDTO, Integer, Hash)>)

    FileWIthUrlDTO data, response status code and response headers



1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1313

def user_file_with_http_info(object_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_file ...'
  end
  # verify the required parameter 'object_key' is set
  if @api_client.config.client_side_validation && object_key.nil?
    fail ArgumentError, "Missing the required parameter 'object_key' when calling UserApi.user_file"
  end
  # resource path
  local_var_path = '/api/v1/user/file/{objectKey}'.sub('{' + 'objectKey' + '}', CGI.escape(object_key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FileWIthUrlDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.user_file",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#user_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#user_files(opts = {}) ⇒ FileListDTO

List and search your own files.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)

    Search for a ISRC

  • :contributor (String)

    Search for a name that was involved as any contributor.

  • :main_artist (String)

    Search for a main artist.

  • :composer (String)

    Search for a composer.

  • :title (String)

    Search for a title.

  • :language (String)

    Search for a language of the lyrics.

  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :origin_decade (String)
  • :curateability (String)
  • :use_case (String)
  • :channel_suitability (String)
  • :similar_to_recording (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)

    Search for a minimal bpm.

  • :bpm_max (Integer)

    Search for a maximal bpm.

  • :name (String)

    Search for a file name.

  • :folder (String)

    Search for a folder.

  • :extension (String)

    Search for a file extension.

  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)

    Search for a fingerprint status.

  • :inference_status (String)

    Search for a inference status.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 100)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:



1423
1424
1425
1426
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1423

def user_files(opts = {})
  data, _status_code, _headers = user_files_with_http_info(opts)
  data
end

#user_files_download(opts = {}) ⇒ Array<FileMinimalWithUrlDTO>

Download links for your files

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)
  • :contributor (String)
  • :main_artist (String)
  • :composer (String)
  • :title (String)
  • :language (String)
  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)
  • :bpm_max (Integer)
  • :name (String)
  • :folder (String)
  • :extension (String)
  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)
  • :inference_status (String)
  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 100)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:



1798
1799
1800
1801
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1798

def user_files_download(opts = {})
  data, _status_code, _headers = user_files_download_with_http_info(opts)
  data
end

#user_files_download_with_http_info(opts = {}) ⇒ Array<(Array<FileMinimalWithUrlDTO>, Integer, Hash)>

Download links for your files

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)
  • :contributor (String)
  • :main_artist (String)
  • :composer (String)
  • :title (String)
  • :language (String)
  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)
  • :bpm_max (Integer)
  • :name (String)
  • :folder (String)
  • :extension (String)
  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)
  • :inference_status (String)
  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 100)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:

  • (Array<(Array<FileMinimalWithUrlDTO>, Integer, Hash)>)

    Array<FileMinimalWithUrlDTO> data, response status code and response headers



1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1860

def user_files_download_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_files_download ...'
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_mood_cluster'] && !allowable_values.include?(opts[:'primary_mood_cluster'])
    fail ArgumentError, "invalid value for \"primary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'secondary_mood_cluster'] && !allowable_values.include?(opts[:'secondary_mood_cluster'])
    fail ArgumentError, "invalid value for \"secondary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'tertiary_mood_cluster'] && !allowable_values.include?(opts[:'tertiary_mood_cluster'])
    fail ArgumentError, "invalid value for \"tertiary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"]
  if @api_client.config.client_side_validation && opts[:'valence'] && !allowable_values.include?(opts[:'valence'])
    fail ArgumentError, "invalid value for \"valence\", must be one of #{allowable_values}"
  end
  allowable_values = ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"]
  if @api_client.config.client_side_validation && opts[:'arousal'] && !allowable_values.include?(opts[:'arousal'])
    fail ArgumentError, "invalid value for \"arousal\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"]
  if @api_client.config.client_side_validation && opts[:'pleasantness'] && !allowable_values.include?(opts[:'pleasantness'])
    fail ArgumentError, "invalid value for \"pleasantness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"]
  if @api_client.config.client_side_validation && opts[:'engagement'] && !allowable_values.include?(opts[:'engagement'])
    fail ArgumentError, "invalid value for \"engagement\", must be one of #{allowable_values}"
  end
  allowable_values = ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"]
  if @api_client.config.client_side_validation && opts[:'vocals'] && !allowable_values.include?(opts[:'vocals'])
    fail ArgumentError, "invalid value for \"vocals\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'dominant_instrument'] && !allowable_values.include?(opts[:'dominant_instrument'])
    fail ArgumentError, "invalid value for \"dominant_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'secondary_instrument'] && !allowable_values.include?(opts[:'secondary_instrument'])
    fail ArgumentError, "invalid value for \"secondary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'tertiary_instrument'] && !allowable_values.include?(opts[:'tertiary_instrument'])
    fail ArgumentError, "invalid value for \"tertiary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"]
  if @api_client.config.client_side_validation && opts[:'energy'] && !allowable_values.include?(opts[:'energy'])
    fail ArgumentError, "invalid value for \"energy\", must be one of #{allowable_values}"
  end
  allowable_values = ["acoustic", "electric", "electronic", "mixed sound generation"]
  if @api_client.config.client_side_validation && opts[:'sound_generation'] && !allowable_values.include?(opts[:'sound_generation'])
    fail ArgumentError, "invalid value for \"sound_generation\", must be one of #{allowable_values}"
  end
  allowable_values = ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"]
  if @api_client.config.client_side_validation && opts[:'tempo'] && !allowable_values.include?(opts[:'tempo'])
    fail ArgumentError, "invalid value for \"tempo\", must be one of #{allowable_values}"
  end
  allowable_values = ["major key", "minor key", "neutral key"]
  if @api_client.config.client_side_validation && opts[:'scale'] && !allowable_values.include?(opts[:'scale'])
    fail ArgumentError, "invalid value for \"scale\", must be one of #{allowable_values}"
  end
  allowable_values = ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"]
  if @api_client.config.client_side_validation && opts[:'rhythm'] && !allowable_values.include?(opts[:'rhythm'])
    fail ArgumentError, "invalid value for \"rhythm\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_sound_character'] && !allowable_values.include?(opts[:'primary_sound_character'])
    fail ArgumentError, "invalid value for \"primary_sound_character\", must be one of #{allowable_values}"
  end
  allowable_values = ["very warm", "warm", "moderate timbre", "bright", "very bright"]
  if @api_client.config.client_side_validation && opts[:'timbre'] && !allowable_values.include?(opts[:'timbre'])
    fail ArgumentError, "invalid value for \"timbre\", must be one of #{allowable_values}"
  end
  allowable_values = ["very clear", "clear", "moderate roughness", "distorted", "very distorted"]
  if @api_client.config.client_side_validation && opts[:'roughness'] && !allowable_values.include?(opts[:'roughness'])
    fail ArgumentError, "invalid value for \"roughness\", must be one of #{allowable_values}"
  end
  allowable_values = ["monotonous", "moderate melodiousness", "melodious", "atonal"]
  if @api_client.config.client_side_validation && opts[:'tonality'] && !allowable_values.include?(opts[:'tonality'])
    fail ArgumentError, "invalid value for \"tonality\", must be one of #{allowable_values}"
  end
  allowable_values = ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"]
  if @api_client.config.client_side_validation && opts[:'harmony'] && !allowable_values.include?(opts[:'harmony'])
    fail ArgumentError, "invalid value for \"harmony\", must be one of #{allowable_values}"
  end
  allowable_values = ["very thin", "thin", "moderate texture", "full", "very full"]
  if @api_client.config.client_side_validation && opts[:'texture'] && !allowable_values.include?(opts[:'texture'])
    fail ArgumentError, "invalid value for \"texture\", must be one of #{allowable_values}"
  end
  allowable_values = ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"]
  if @api_client.config.client_side_validation && opts[:'groovyness'] && !allowable_values.include?(opts[:'groovyness'])
    fail ArgumentError, "invalid value for \"groovyness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very compact", "compact", "moderate space", "wide", "very wide"]
  if @api_client.config.client_side_validation && opts[:'space'] && !allowable_values.include?(opts[:'space'])
    fail ArgumentError, "invalid value for \"space\", must be one of #{allowable_values}"
  end
  allowable_values = ["low production quality", "medium production quality", "high production quality"]
  if @api_client.config.client_side_validation && opts[:'production_rating'] && !allowable_values.include?(opts[:'production_rating'])
    fail ArgumentError, "invalid value for \"production_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low performance quality", "medium performance quality", "high performance quality"]
  if @api_client.config.client_side_validation && opts[:'performance_rating'] && !allowable_values.include?(opts[:'performance_rating'])
    fail ArgumentError, "invalid value for \"performance_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low song quality", "medium song quality", "high song quality"]
  if @api_client.config.client_side_validation && opts[:'song_rating'] && !allowable_values.include?(opts[:'song_rating'])
    fail ArgumentError, "invalid value for \"song_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"]
  if @api_client.config.client_side_validation && opts[:'audience_age'] && !allowable_values.include?(opts[:'audience_age'])
    fail ArgumentError, "invalid value for \"audience_age\", must be one of #{allowable_values}"
  end
  allowable_values = ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"]
  if @api_client.config.client_side_validation && opts[:'audience_region'] && !allowable_values.include?(opts[:'audience_region'])
    fail ArgumentError, "invalid value for \"audience_region\", must be one of #{allowable_values}"
  end
  allowable_values = ["male", "female"]
  if @api_client.config.client_side_validation && opts[:'audience_gender'] && !allowable_values.include?(opts[:'audience_gender'])
    fail ArgumentError, "invalid value for \"audience_gender\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UserApi.user_files_download, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UserApi.user_files_download, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/api/v1/user/filesDownload'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'isrc'] = opts[:'isrc'] if !opts[:'isrc'].nil?
  query_params[:'contributor'] = opts[:'contributor'] if !opts[:'contributor'].nil?
  query_params[:'mainArtist'] = opts[:'main_artist'] if !opts[:'main_artist'].nil?
  query_params[:'composer'] = opts[:'composer'] if !opts[:'composer'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'genreNames'] = @api_client.build_collection_param(opts[:'genre_names'], :multi) if !opts[:'genre_names'].nil?
  query_params[:'tagNames'] = @api_client.build_collection_param(opts[:'tag_names'], :multi) if !opts[:'tag_names'].nil?
  query_params[:'releaseDate'] = opts[:'release_date'] if !opts[:'release_date'].nil?
  query_params[:'primaryMoodCluster'] = opts[:'primary_mood_cluster'] if !opts[:'primary_mood_cluster'].nil?
  query_params[:'secondaryMoodCluster'] = opts[:'secondary_mood_cluster'] if !opts[:'secondary_mood_cluster'].nil?
  query_params[:'tertiaryMoodCluster'] = opts[:'tertiary_mood_cluster'] if !opts[:'tertiary_mood_cluster'].nil?
  query_params[:'valence'] = opts[:'valence'] if !opts[:'valence'].nil?
  query_params[:'arousal'] = opts[:'arousal'] if !opts[:'arousal'].nil?
  query_params[:'pleasantness'] = opts[:'pleasantness'] if !opts[:'pleasantness'].nil?
  query_params[:'engagement'] = opts[:'engagement'] if !opts[:'engagement'].nil?
  query_params[:'vocals'] = opts[:'vocals'] if !opts[:'vocals'].nil?
  query_params[:'dominantInstrument'] = opts[:'dominant_instrument'] if !opts[:'dominant_instrument'].nil?
  query_params[:'secondaryInstrument'] = opts[:'secondary_instrument'] if !opts[:'secondary_instrument'].nil?
  query_params[:'tertiaryInstrument'] = opts[:'tertiary_instrument'] if !opts[:'tertiary_instrument'].nil?
  query_params[:'energy'] = opts[:'energy'] if !opts[:'energy'].nil?
  query_params[:'soundGeneration'] = opts[:'sound_generation'] if !opts[:'sound_generation'].nil?
  query_params[:'tempo'] = opts[:'tempo'] if !opts[:'tempo'].nil?
  query_params[:'scale'] = opts[:'scale'] if !opts[:'scale'].nil?
  query_params[:'rhythm'] = opts[:'rhythm'] if !opts[:'rhythm'].nil?
  query_params[:'primarySoundCharacter'] = opts[:'primary_sound_character'] if !opts[:'primary_sound_character'].nil?
  query_params[:'timbre'] = opts[:'timbre'] if !opts[:'timbre'].nil?
  query_params[:'roughness'] = opts[:'roughness'] if !opts[:'roughness'].nil?
  query_params[:'tonality'] = opts[:'tonality'] if !opts[:'tonality'].nil?
  query_params[:'harmony'] = opts[:'harmony'] if !opts[:'harmony'].nil?
  query_params[:'texture'] = opts[:'texture'] if !opts[:'texture'].nil?
  query_params[:'groovyness'] = opts[:'groovyness'] if !opts[:'groovyness'].nil?
  query_params[:'space'] = opts[:'space'] if !opts[:'space'].nil?
  query_params[:'productionRating'] = opts[:'production_rating'] if !opts[:'production_rating'].nil?
  query_params[:'performanceRating'] = opts[:'performance_rating'] if !opts[:'performance_rating'].nil?
  query_params[:'songRating'] = opts[:'song_rating'] if !opts[:'song_rating'].nil?
  query_params[:'audienceAge'] = opts[:'audience_age'] if !opts[:'audience_age'].nil?
  query_params[:'audienceRegion'] = opts[:'audience_region'] if !opts[:'audience_region'].nil?
  query_params[:'audienceGender'] = opts[:'audience_gender'] if !opts[:'audience_gender'].nil?
  query_params[:'songtradrTrackId'] = opts[:'songtradr_track_id'] if !opts[:'songtradr_track_id'].nil?
  query_params[:'usageName'] = opts[:'usage_name'] if !opts[:'usage_name'].nil?
  query_params[:'bpmMin'] = opts[:'bpm_min'] if !opts[:'bpm_min'].nil?
  query_params[:'bpmMax'] = opts[:'bpm_max'] if !opts[:'bpm_max'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil?
  query_params[:'uploadEndTime'] = opts[:'upload_end_time'] if !opts[:'upload_end_time'].nil?
  query_params[:'minUploadEndTime'] = opts[:'min_upload_end_time'] if !opts[:'min_upload_end_time'].nil?
  query_params[:'maxUploadEndTime'] = opts[:'max_upload_end_time'] if !opts[:'max_upload_end_time'].nil?
  query_params[:'fingerprintStatus'] = opts[:'fingerprint_status'] if !opts[:'fingerprint_status'].nil?
  query_params[:'inferenceStatus'] = opts[:'inference_status'] if !opts[:'inference_status'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<FileMinimalWithUrlDTO>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.user_files_download",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#user_files_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#user_files_status(object_keys, opts = {}) ⇒ Array<FileSmallDTO>

Status details for files.

Parameters:

  • object_keys (String)

    Comma-separated list of objectKeys of the files.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2090
2091
2092
2093
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2090

def user_files_status(object_keys, opts = {})
  data, _status_code, _headers = user_files_status_with_http_info(object_keys, opts)
  data
end

#user_files_status_with_http_info(object_keys, opts = {}) ⇒ Array<(Array<FileSmallDTO>, Integer, Hash)>

Status details for files.

Parameters:

  • object_keys (String)

    Comma-separated list of objectKeys of the files.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<FileSmallDTO>, Integer, Hash)>)

    Array<FileSmallDTO> data, response status code and response headers



2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2099

def user_files_status_with_http_info(object_keys, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_files_status ...'
  end
  # verify the required parameter 'object_keys' is set
  if @api_client.config.client_side_validation && object_keys.nil?
    fail ArgumentError, "Missing the required parameter 'object_keys' when calling UserApi.user_files_status"
  end
  # resource path
  local_var_path = '/api/v1/user/filesStatus'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'objectKeys'] = object_keys

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<FileSmallDTO>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.user_files_status",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#user_files_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#user_files_summary(opts = {}) ⇒ FilesSummaryDTO

Summary fo your files.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)

    Search for a ISRC

  • :contributor (String)

    Search for a name that was involved as any contributor.

  • :main_artist (String)

    Search for a main artist.

  • :composer (String)

    Search for a composer.

  • :title (String)

    Search for a title.

  • :language (String)

    Search for a language of the lyrics.

  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :origin_decade (String)
  • :curateability (String)
  • :use_case (String)
  • :channel_suitability (String)
  • :similar_to_recording (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)

    Search for a minimal bpm.

  • :bpm_max (Integer)

    Search for a maximal bpm.

  • :name (String)

    Search for a file name.

  • :folder (String)

    Search for a folder.

  • :extension (String)

    Search for a file extension.

  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)

    Search for a fingerprint status.

  • :inference_status (String)

    Search for a inference status.

Returns:



2207
2208
2209
2210
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2207

def user_files_summary(opts = {})
  data, _status_code, _headers = user_files_summary_with_http_info(opts)
  data
end

#user_files_summary_with_http_info(opts = {}) ⇒ Array<(FilesSummaryDTO, Integer, Hash)>

Summary fo your files.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)

    Search for a ISRC

  • :contributor (String)

    Search for a name that was involved as any contributor.

  • :main_artist (String)

    Search for a main artist.

  • :composer (String)

    Search for a composer.

  • :title (String)

    Search for a title.

  • :language (String)

    Search for a language of the lyrics.

  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :origin_decade (String)
  • :curateability (String)
  • :use_case (String)
  • :channel_suitability (String)
  • :similar_to_recording (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)

    Search for a minimal bpm.

  • :bpm_max (Integer)

    Search for a maximal bpm.

  • :name (String)

    Search for a file name.

  • :folder (String)

    Search for a folder.

  • :extension (String)

    Search for a file extension.

  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)

    Search for a fingerprint status.

  • :inference_status (String)

    Search for a inference status.

Returns:

  • (Array<(FilesSummaryDTO, Integer, Hash)>)

    FilesSummaryDTO data, response status code and response headers



2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2271

def user_files_summary_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_files_summary ...'
  end
  allowable_values = ["en", "es", "fr", "de", "jp", "cn", "IT", "RU"]
  if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
    fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_mood_cluster'] && !allowable_values.include?(opts[:'primary_mood_cluster'])
    fail ArgumentError, "invalid value for \"primary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'secondary_mood_cluster'] && !allowable_values.include?(opts[:'secondary_mood_cluster'])
    fail ArgumentError, "invalid value for \"secondary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'tertiary_mood_cluster'] && !allowable_values.include?(opts[:'tertiary_mood_cluster'])
    fail ArgumentError, "invalid value for \"tertiary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"]
  if @api_client.config.client_side_validation && opts[:'valence'] && !allowable_values.include?(opts[:'valence'])
    fail ArgumentError, "invalid value for \"valence\", must be one of #{allowable_values}"
  end
  allowable_values = ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"]
  if @api_client.config.client_side_validation && opts[:'arousal'] && !allowable_values.include?(opts[:'arousal'])
    fail ArgumentError, "invalid value for \"arousal\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"]
  if @api_client.config.client_side_validation && opts[:'pleasantness'] && !allowable_values.include?(opts[:'pleasantness'])
    fail ArgumentError, "invalid value for \"pleasantness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"]
  if @api_client.config.client_side_validation && opts[:'engagement'] && !allowable_values.include?(opts[:'engagement'])
    fail ArgumentError, "invalid value for \"engagement\", must be one of #{allowable_values}"
  end
  allowable_values = ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"]
  if @api_client.config.client_side_validation && opts[:'vocals'] && !allowable_values.include?(opts[:'vocals'])
    fail ArgumentError, "invalid value for \"vocals\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'dominant_instrument'] && !allowable_values.include?(opts[:'dominant_instrument'])
    fail ArgumentError, "invalid value for \"dominant_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'secondary_instrument'] && !allowable_values.include?(opts[:'secondary_instrument'])
    fail ArgumentError, "invalid value for \"secondary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'tertiary_instrument'] && !allowable_values.include?(opts[:'tertiary_instrument'])
    fail ArgumentError, "invalid value for \"tertiary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"]
  if @api_client.config.client_side_validation && opts[:'energy'] && !allowable_values.include?(opts[:'energy'])
    fail ArgumentError, "invalid value for \"energy\", must be one of #{allowable_values}"
  end
  allowable_values = ["acoustic", "electric", "electronic", "mixed sound generation"]
  if @api_client.config.client_side_validation && opts[:'sound_generation'] && !allowable_values.include?(opts[:'sound_generation'])
    fail ArgumentError, "invalid value for \"sound_generation\", must be one of #{allowable_values}"
  end
  allowable_values = ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"]
  if @api_client.config.client_side_validation && opts[:'tempo'] && !allowable_values.include?(opts[:'tempo'])
    fail ArgumentError, "invalid value for \"tempo\", must be one of #{allowable_values}"
  end
  allowable_values = ["major key", "minor key", "neutral key"]
  if @api_client.config.client_side_validation && opts[:'scale'] && !allowable_values.include?(opts[:'scale'])
    fail ArgumentError, "invalid value for \"scale\", must be one of #{allowable_values}"
  end
  allowable_values = ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"]
  if @api_client.config.client_side_validation && opts[:'rhythm'] && !allowable_values.include?(opts[:'rhythm'])
    fail ArgumentError, "invalid value for \"rhythm\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_sound_character'] && !allowable_values.include?(opts[:'primary_sound_character'])
    fail ArgumentError, "invalid value for \"primary_sound_character\", must be one of #{allowable_values}"
  end
  allowable_values = ["very warm", "warm", "moderate timbre", "bright", "very bright"]
  if @api_client.config.client_side_validation && opts[:'timbre'] && !allowable_values.include?(opts[:'timbre'])
    fail ArgumentError, "invalid value for \"timbre\", must be one of #{allowable_values}"
  end
  allowable_values = ["very clear", "clear", "moderate roughness", "distorted", "very distorted"]
  if @api_client.config.client_side_validation && opts[:'roughness'] && !allowable_values.include?(opts[:'roughness'])
    fail ArgumentError, "invalid value for \"roughness\", must be one of #{allowable_values}"
  end
  allowable_values = ["monotonous", "moderate melodiousness", "melodious", "atonal"]
  if @api_client.config.client_side_validation && opts[:'tonality'] && !allowable_values.include?(opts[:'tonality'])
    fail ArgumentError, "invalid value for \"tonality\", must be one of #{allowable_values}"
  end
  allowable_values = ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"]
  if @api_client.config.client_side_validation && opts[:'harmony'] && !allowable_values.include?(opts[:'harmony'])
    fail ArgumentError, "invalid value for \"harmony\", must be one of #{allowable_values}"
  end
  allowable_values = ["very thin", "thin", "moderate texture", "full", "very full"]
  if @api_client.config.client_side_validation && opts[:'texture'] && !allowable_values.include?(opts[:'texture'])
    fail ArgumentError, "invalid value for \"texture\", must be one of #{allowable_values}"
  end
  allowable_values = ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"]
  if @api_client.config.client_side_validation && opts[:'groovyness'] && !allowable_values.include?(opts[:'groovyness'])
    fail ArgumentError, "invalid value for \"groovyness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very compact", "compact", "moderate space", "wide", "very wide"]
  if @api_client.config.client_side_validation && opts[:'space'] && !allowable_values.include?(opts[:'space'])
    fail ArgumentError, "invalid value for \"space\", must be one of #{allowable_values}"
  end
  allowable_values = ["low production quality", "medium production quality", "high production quality"]
  if @api_client.config.client_side_validation && opts[:'production_rating'] && !allowable_values.include?(opts[:'production_rating'])
    fail ArgumentError, "invalid value for \"production_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low performance quality", "medium performance quality", "high performance quality"]
  if @api_client.config.client_side_validation && opts[:'performance_rating'] && !allowable_values.include?(opts[:'performance_rating'])
    fail ArgumentError, "invalid value for \"performance_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low song quality", "medium song quality", "high song quality"]
  if @api_client.config.client_side_validation && opts[:'song_rating'] && !allowable_values.include?(opts[:'song_rating'])
    fail ArgumentError, "invalid value for \"song_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"]
  if @api_client.config.client_side_validation && opts[:'audience_age'] && !allowable_values.include?(opts[:'audience_age'])
    fail ArgumentError, "invalid value for \"audience_age\", must be one of #{allowable_values}"
  end
  allowable_values = ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"]
  if @api_client.config.client_side_validation && opts[:'audience_region'] && !allowable_values.include?(opts[:'audience_region'])
    fail ArgumentError, "invalid value for \"audience_region\", must be one of #{allowable_values}"
  end
  allowable_values = ["male", "female"]
  if @api_client.config.client_side_validation && opts[:'audience_gender'] && !allowable_values.include?(opts[:'audience_gender'])
    fail ArgumentError, "invalid value for \"audience_gender\", must be one of #{allowable_values}"
  end
  allowable_values = ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"]
  if @api_client.config.client_side_validation && opts[:'origin_decade'] && !allowable_values.include?(opts[:'origin_decade'])
    fail ArgumentError, "invalid value for \"origin_decade\", must be one of #{allowable_values}"
  end
  allowable_values = ["curateable", "uncurateable"]
  if @api_client.config.client_side_validation && opts[:'curateability'] && !allowable_values.include?(opts[:'curateability'])
    fail ArgumentError, "invalid value for \"curateability\", must be one of #{allowable_values}"
  end
  allowable_values = ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax"]
  if @api_client.config.client_side_validation && opts[:'use_case'] && !allowable_values.include?(opts[:'use_case'])
    fail ArgumentError, "invalid value for \"use_case\", must be one of #{allowable_values}"
  end
  allowable_values = ["Spotify", "TikTok", "Unfitting", "YouTube"]
  if @api_client.config.client_side_validation && opts[:'channel_suitability'] && !allowable_values.include?(opts[:'channel_suitability'])
    fail ArgumentError, "invalid value for \"channel_suitability\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/v1/user/filesSummary'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ISRC'] = opts[:'isrc'] if !opts[:'isrc'].nil?
  query_params[:'contributor'] = opts[:'contributor'] if !opts[:'contributor'].nil?
  query_params[:'mainArtist'] = opts[:'main_artist'] if !opts[:'main_artist'].nil?
  query_params[:'composer'] = opts[:'composer'] if !opts[:'composer'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'genreNames'] = @api_client.build_collection_param(opts[:'genre_names'], :multi) if !opts[:'genre_names'].nil?
  query_params[:'tagNames'] = @api_client.build_collection_param(opts[:'tag_names'], :multi) if !opts[:'tag_names'].nil?
  query_params[:'releaseDate'] = opts[:'release_date'] if !opts[:'release_date'].nil?
  query_params[:'primaryMoodCluster'] = opts[:'primary_mood_cluster'] if !opts[:'primary_mood_cluster'].nil?
  query_params[:'secondaryMoodCluster'] = opts[:'secondary_mood_cluster'] if !opts[:'secondary_mood_cluster'].nil?
  query_params[:'tertiaryMoodCluster'] = opts[:'tertiary_mood_cluster'] if !opts[:'tertiary_mood_cluster'].nil?
  query_params[:'valence'] = opts[:'valence'] if !opts[:'valence'].nil?
  query_params[:'arousal'] = opts[:'arousal'] if !opts[:'arousal'].nil?
  query_params[:'pleasantness'] = opts[:'pleasantness'] if !opts[:'pleasantness'].nil?
  query_params[:'engagement'] = opts[:'engagement'] if !opts[:'engagement'].nil?
  query_params[:'vocals'] = opts[:'vocals'] if !opts[:'vocals'].nil?
  query_params[:'dominantInstrument'] = opts[:'dominant_instrument'] if !opts[:'dominant_instrument'].nil?
  query_params[:'secondaryInstrument'] = opts[:'secondary_instrument'] if !opts[:'secondary_instrument'].nil?
  query_params[:'tertiaryInstrument'] = opts[:'tertiary_instrument'] if !opts[:'tertiary_instrument'].nil?
  query_params[:'energy'] = opts[:'energy'] if !opts[:'energy'].nil?
  query_params[:'soundGeneration'] = opts[:'sound_generation'] if !opts[:'sound_generation'].nil?
  query_params[:'tempo'] = opts[:'tempo'] if !opts[:'tempo'].nil?
  query_params[:'scale'] = opts[:'scale'] if !opts[:'scale'].nil?
  query_params[:'rhythm'] = opts[:'rhythm'] if !opts[:'rhythm'].nil?
  query_params[:'primarySoundCharacter'] = opts[:'primary_sound_character'] if !opts[:'primary_sound_character'].nil?
  query_params[:'timbre'] = opts[:'timbre'] if !opts[:'timbre'].nil?
  query_params[:'roughness'] = opts[:'roughness'] if !opts[:'roughness'].nil?
  query_params[:'tonality'] = opts[:'tonality'] if !opts[:'tonality'].nil?
  query_params[:'harmony'] = opts[:'harmony'] if !opts[:'harmony'].nil?
  query_params[:'texture'] = opts[:'texture'] if !opts[:'texture'].nil?
  query_params[:'groovyness'] = opts[:'groovyness'] if !opts[:'groovyness'].nil?
  query_params[:'space'] = opts[:'space'] if !opts[:'space'].nil?
  query_params[:'productionRating'] = opts[:'production_rating'] if !opts[:'production_rating'].nil?
  query_params[:'performanceRating'] = opts[:'performance_rating'] if !opts[:'performance_rating'].nil?
  query_params[:'songRating'] = opts[:'song_rating'] if !opts[:'song_rating'].nil?
  query_params[:'audienceAge'] = opts[:'audience_age'] if !opts[:'audience_age'].nil?
  query_params[:'audienceRegion'] = opts[:'audience_region'] if !opts[:'audience_region'].nil?
  query_params[:'audienceGender'] = opts[:'audience_gender'] if !opts[:'audience_gender'].nil?
  query_params[:'originDecade'] = opts[:'origin_decade'] if !opts[:'origin_decade'].nil?
  query_params[:'curateability'] = opts[:'curateability'] if !opts[:'curateability'].nil?
  query_params[:'useCase'] = opts[:'use_case'] if !opts[:'use_case'].nil?
  query_params[:'channelSuitability'] = opts[:'channel_suitability'] if !opts[:'channel_suitability'].nil?
  query_params[:'similarToRecording'] = opts[:'similar_to_recording'] if !opts[:'similar_to_recording'].nil?
  query_params[:'songtradrTrackId'] = opts[:'songtradr_track_id'] if !opts[:'songtradr_track_id'].nil?
  query_params[:'usageName'] = opts[:'usage_name'] if !opts[:'usage_name'].nil?
  query_params[:'bpmMin'] = opts[:'bpm_min'] if !opts[:'bpm_min'].nil?
  query_params[:'bpmMax'] = opts[:'bpm_max'] if !opts[:'bpm_max'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil?
  query_params[:'uploadEndTime'] = opts[:'upload_end_time'] if !opts[:'upload_end_time'].nil?
  query_params[:'minUploadEndTime'] = opts[:'min_upload_end_time'] if !opts[:'min_upload_end_time'].nil?
  query_params[:'maxUploadEndTime'] = opts[:'max_upload_end_time'] if !opts[:'max_upload_end_time'].nil?
  query_params[:'fingerprintStatus'] = opts[:'fingerprint_status'] if !opts[:'fingerprint_status'].nil?
  query_params[:'inferenceStatus'] = opts[:'inference_status'] if !opts[:'inference_status'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FilesSummaryDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.user_files_summary",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#user_files_summary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#user_files_with_http_info(opts = {}) ⇒ Array<(FileListDTO, Integer, Hash)>

List and search your own files.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :isrc (String)

    Search for a ISRC

  • :contributor (String)

    Search for a name that was involved as any contributor.

  • :main_artist (String)

    Search for a main artist.

  • :composer (String)

    Search for a composer.

  • :title (String)

    Search for a title.

  • :language (String)

    Search for a language of the lyrics.

  • :genre_names (Array<String>)
  • :tag_names (Array<String>)
  • :release_date (Time)
  • :primary_mood_cluster (String)
  • :secondary_mood_cluster (String)
  • :tertiary_mood_cluster (String)
  • :valence (String)
  • :arousal (String)
  • :pleasantness (String)
  • :engagement (String)
  • :vocals (String)
  • :dominant_instrument (String)
  • :secondary_instrument (String)
  • :tertiary_instrument (String)
  • :energy (String)
  • :sound_generation (String)
  • :tempo (String)
  • :scale (String)
  • :rhythm (String)
  • :primary_sound_character (String)
  • :timbre (String)
  • :roughness (String)
  • :tonality (String)
  • :harmony (String)
  • :texture (String)
  • :groovyness (String)
  • :space (String)
  • :production_rating (String)
  • :performance_rating (String)
  • :song_rating (String)
  • :audience_age (String)
  • :audience_region (String)
  • :audience_gender (String)
  • :origin_decade (String)
  • :curateability (String)
  • :use_case (String)
  • :channel_suitability (String)
  • :similar_to_recording (String)
  • :songtradr_track_id (String)
  • :usage_name (String)
  • :bpm_min (Integer)

    Search for a minimal bpm.

  • :bpm_max (Integer)

    Search for a maximal bpm.

  • :name (String)

    Search for a file name.

  • :folder (String)

    Search for a folder.

  • :extension (String)

    Search for a file extension.

  • :upload_end_time (Time)
  • :min_upload_end_time (Time)
  • :max_upload_end_time (Time)
  • :fingerprint_status (String)

    Search for a fingerprint status.

  • :inference_status (String)

    Search for a inference status.

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 100)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:

  • (Array<(FileListDTO, Integer, Hash)>)

    FileListDTO data, response status code and response headers



1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 1490

def user_files_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_files ...'
  end
  allowable_values = ["en", "es", "fr", "de", "jp", "cn", "IT", "RU"]
  if @api_client.config.client_side_validation && opts[:'language'] && !allowable_values.include?(opts[:'language'])
    fail ArgumentError, "invalid value for \"language\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_mood_cluster'] && !allowable_values.include?(opts[:'primary_mood_cluster'])
    fail ArgumentError, "invalid value for \"primary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'secondary_mood_cluster'] && !allowable_values.include?(opts[:'secondary_mood_cluster'])
    fail ArgumentError, "invalid value for \"secondary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'tertiary_mood_cluster'] && !allowable_values.include?(opts[:'tertiary_mood_cluster'])
    fail ArgumentError, "invalid value for \"tertiary_mood_cluster\", must be one of #{allowable_values}"
  end
  allowable_values = ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"]
  if @api_client.config.client_side_validation && opts[:'valence'] && !allowable_values.include?(opts[:'valence'])
    fail ArgumentError, "invalid value for \"valence\", must be one of #{allowable_values}"
  end
  allowable_values = ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"]
  if @api_client.config.client_side_validation && opts[:'arousal'] && !allowable_values.include?(opts[:'arousal'])
    fail ArgumentError, "invalid value for \"arousal\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"]
  if @api_client.config.client_side_validation && opts[:'pleasantness'] && !allowable_values.include?(opts[:'pleasantness'])
    fail ArgumentError, "invalid value for \"pleasantness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"]
  if @api_client.config.client_side_validation && opts[:'engagement'] && !allowable_values.include?(opts[:'engagement'])
    fail ArgumentError, "invalid value for \"engagement\", must be one of #{allowable_values}"
  end
  allowable_values = ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"]
  if @api_client.config.client_side_validation && opts[:'vocals'] && !allowable_values.include?(opts[:'vocals'])
    fail ArgumentError, "invalid value for \"vocals\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'dominant_instrument'] && !allowable_values.include?(opts[:'dominant_instrument'])
    fail ArgumentError, "invalid value for \"dominant_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'secondary_instrument'] && !allowable_values.include?(opts[:'secondary_instrument'])
    fail ArgumentError, "invalid value for \"secondary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"]
  if @api_client.config.client_side_validation && opts[:'tertiary_instrument'] && !allowable_values.include?(opts[:'tertiary_instrument'])
    fail ArgumentError, "invalid value for \"tertiary_instrument\", must be one of #{allowable_values}"
  end
  allowable_values = ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"]
  if @api_client.config.client_side_validation && opts[:'energy'] && !allowable_values.include?(opts[:'energy'])
    fail ArgumentError, "invalid value for \"energy\", must be one of #{allowable_values}"
  end
  allowable_values = ["acoustic", "electric", "electronic", "mixed sound generation"]
  if @api_client.config.client_side_validation && opts[:'sound_generation'] && !allowable_values.include?(opts[:'sound_generation'])
    fail ArgumentError, "invalid value for \"sound_generation\", must be one of #{allowable_values}"
  end
  allowable_values = ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"]
  if @api_client.config.client_side_validation && opts[:'tempo'] && !allowable_values.include?(opts[:'tempo'])
    fail ArgumentError, "invalid value for \"tempo\", must be one of #{allowable_values}"
  end
  allowable_values = ["major key", "minor key", "neutral key"]
  if @api_client.config.client_side_validation && opts[:'scale'] && !allowable_values.include?(opts[:'scale'])
    fail ArgumentError, "invalid value for \"scale\", must be one of #{allowable_values}"
  end
  allowable_values = ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"]
  if @api_client.config.client_side_validation && opts[:'rhythm'] && !allowable_values.include?(opts[:'rhythm'])
    fail ArgumentError, "invalid value for \"rhythm\", must be one of #{allowable_values}"
  end
  allowable_values = ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"]
  if @api_client.config.client_side_validation && opts[:'primary_sound_character'] && !allowable_values.include?(opts[:'primary_sound_character'])
    fail ArgumentError, "invalid value for \"primary_sound_character\", must be one of #{allowable_values}"
  end
  allowable_values = ["very warm", "warm", "moderate timbre", "bright", "very bright"]
  if @api_client.config.client_side_validation && opts[:'timbre'] && !allowable_values.include?(opts[:'timbre'])
    fail ArgumentError, "invalid value for \"timbre\", must be one of #{allowable_values}"
  end
  allowable_values = ["very clear", "clear", "moderate roughness", "distorted", "very distorted"]
  if @api_client.config.client_side_validation && opts[:'roughness'] && !allowable_values.include?(opts[:'roughness'])
    fail ArgumentError, "invalid value for \"roughness\", must be one of #{allowable_values}"
  end
  allowable_values = ["monotonous", "moderate melodiousness", "melodious", "atonal"]
  if @api_client.config.client_side_validation && opts[:'tonality'] && !allowable_values.include?(opts[:'tonality'])
    fail ArgumentError, "invalid value for \"tonality\", must be one of #{allowable_values}"
  end
  allowable_values = ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"]
  if @api_client.config.client_side_validation && opts[:'harmony'] && !allowable_values.include?(opts[:'harmony'])
    fail ArgumentError, "invalid value for \"harmony\", must be one of #{allowable_values}"
  end
  allowable_values = ["very thin", "thin", "moderate texture", "full", "very full"]
  if @api_client.config.client_side_validation && opts[:'texture'] && !allowable_values.include?(opts[:'texture'])
    fail ArgumentError, "invalid value for \"texture\", must be one of #{allowable_values}"
  end
  allowable_values = ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"]
  if @api_client.config.client_side_validation && opts[:'groovyness'] && !allowable_values.include?(opts[:'groovyness'])
    fail ArgumentError, "invalid value for \"groovyness\", must be one of #{allowable_values}"
  end
  allowable_values = ["very compact", "compact", "moderate space", "wide", "very wide"]
  if @api_client.config.client_side_validation && opts[:'space'] && !allowable_values.include?(opts[:'space'])
    fail ArgumentError, "invalid value for \"space\", must be one of #{allowable_values}"
  end
  allowable_values = ["low production quality", "medium production quality", "high production quality"]
  if @api_client.config.client_side_validation && opts[:'production_rating'] && !allowable_values.include?(opts[:'production_rating'])
    fail ArgumentError, "invalid value for \"production_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low performance quality", "medium performance quality", "high performance quality"]
  if @api_client.config.client_side_validation && opts[:'performance_rating'] && !allowable_values.include?(opts[:'performance_rating'])
    fail ArgumentError, "invalid value for \"performance_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["low song quality", "medium song quality", "high song quality"]
  if @api_client.config.client_side_validation && opts[:'song_rating'] && !allowable_values.include?(opts[:'song_rating'])
    fail ArgumentError, "invalid value for \"song_rating\", must be one of #{allowable_values}"
  end
  allowable_values = ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"]
  if @api_client.config.client_side_validation && opts[:'audience_age'] && !allowable_values.include?(opts[:'audience_age'])
    fail ArgumentError, "invalid value for \"audience_age\", must be one of #{allowable_values}"
  end
  allowable_values = ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"]
  if @api_client.config.client_side_validation && opts[:'audience_region'] && !allowable_values.include?(opts[:'audience_region'])
    fail ArgumentError, "invalid value for \"audience_region\", must be one of #{allowable_values}"
  end
  allowable_values = ["male", "female"]
  if @api_client.config.client_side_validation && opts[:'audience_gender'] && !allowable_values.include?(opts[:'audience_gender'])
    fail ArgumentError, "invalid value for \"audience_gender\", must be one of #{allowable_values}"
  end
  allowable_values = ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"]
  if @api_client.config.client_side_validation && opts[:'origin_decade'] && !allowable_values.include?(opts[:'origin_decade'])
    fail ArgumentError, "invalid value for \"origin_decade\", must be one of #{allowable_values}"
  end
  allowable_values = ["curateable", "uncurateable"]
  if @api_client.config.client_side_validation && opts[:'curateability'] && !allowable_values.include?(opts[:'curateability'])
    fail ArgumentError, "invalid value for \"curateability\", must be one of #{allowable_values}"
  end
  allowable_values = ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax"]
  if @api_client.config.client_side_validation && opts[:'use_case'] && !allowable_values.include?(opts[:'use_case'])
    fail ArgumentError, "invalid value for \"use_case\", must be one of #{allowable_values}"
  end
  allowable_values = ["Spotify", "TikTok", "Unfitting", "YouTube"]
  if @api_client.config.client_side_validation && opts[:'channel_suitability'] && !allowable_values.include?(opts[:'channel_suitability'])
    fail ArgumentError, "invalid value for \"channel_suitability\", must be one of #{allowable_values}"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UserApi.user_files, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UserApi.user_files, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/api/v1/user/files'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ISRC'] = opts[:'isrc'] if !opts[:'isrc'].nil?
  query_params[:'contributor'] = opts[:'contributor'] if !opts[:'contributor'].nil?
  query_params[:'mainArtist'] = opts[:'main_artist'] if !opts[:'main_artist'].nil?
  query_params[:'composer'] = opts[:'composer'] if !opts[:'composer'].nil?
  query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil?
  query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
  query_params[:'genreNames'] = @api_client.build_collection_param(opts[:'genre_names'], :multi) if !opts[:'genre_names'].nil?
  query_params[:'tagNames'] = @api_client.build_collection_param(opts[:'tag_names'], :multi) if !opts[:'tag_names'].nil?
  query_params[:'releaseDate'] = opts[:'release_date'] if !opts[:'release_date'].nil?
  query_params[:'primaryMoodCluster'] = opts[:'primary_mood_cluster'] if !opts[:'primary_mood_cluster'].nil?
  query_params[:'secondaryMoodCluster'] = opts[:'secondary_mood_cluster'] if !opts[:'secondary_mood_cluster'].nil?
  query_params[:'tertiaryMoodCluster'] = opts[:'tertiary_mood_cluster'] if !opts[:'tertiary_mood_cluster'].nil?
  query_params[:'valence'] = opts[:'valence'] if !opts[:'valence'].nil?
  query_params[:'arousal'] = opts[:'arousal'] if !opts[:'arousal'].nil?
  query_params[:'pleasantness'] = opts[:'pleasantness'] if !opts[:'pleasantness'].nil?
  query_params[:'engagement'] = opts[:'engagement'] if !opts[:'engagement'].nil?
  query_params[:'vocals'] = opts[:'vocals'] if !opts[:'vocals'].nil?
  query_params[:'dominantInstrument'] = opts[:'dominant_instrument'] if !opts[:'dominant_instrument'].nil?
  query_params[:'secondaryInstrument'] = opts[:'secondary_instrument'] if !opts[:'secondary_instrument'].nil?
  query_params[:'tertiaryInstrument'] = opts[:'tertiary_instrument'] if !opts[:'tertiary_instrument'].nil?
  query_params[:'energy'] = opts[:'energy'] if !opts[:'energy'].nil?
  query_params[:'soundGeneration'] = opts[:'sound_generation'] if !opts[:'sound_generation'].nil?
  query_params[:'tempo'] = opts[:'tempo'] if !opts[:'tempo'].nil?
  query_params[:'scale'] = opts[:'scale'] if !opts[:'scale'].nil?
  query_params[:'rhythm'] = opts[:'rhythm'] if !opts[:'rhythm'].nil?
  query_params[:'primarySoundCharacter'] = opts[:'primary_sound_character'] if !opts[:'primary_sound_character'].nil?
  query_params[:'timbre'] = opts[:'timbre'] if !opts[:'timbre'].nil?
  query_params[:'roughness'] = opts[:'roughness'] if !opts[:'roughness'].nil?
  query_params[:'tonality'] = opts[:'tonality'] if !opts[:'tonality'].nil?
  query_params[:'harmony'] = opts[:'harmony'] if !opts[:'harmony'].nil?
  query_params[:'texture'] = opts[:'texture'] if !opts[:'texture'].nil?
  query_params[:'groovyness'] = opts[:'groovyness'] if !opts[:'groovyness'].nil?
  query_params[:'space'] = opts[:'space'] if !opts[:'space'].nil?
  query_params[:'productionRating'] = opts[:'production_rating'] if !opts[:'production_rating'].nil?
  query_params[:'performanceRating'] = opts[:'performance_rating'] if !opts[:'performance_rating'].nil?
  query_params[:'songRating'] = opts[:'song_rating'] if !opts[:'song_rating'].nil?
  query_params[:'audienceAge'] = opts[:'audience_age'] if !opts[:'audience_age'].nil?
  query_params[:'audienceRegion'] = opts[:'audience_region'] if !opts[:'audience_region'].nil?
  query_params[:'audienceGender'] = opts[:'audience_gender'] if !opts[:'audience_gender'].nil?
  query_params[:'originDecade'] = opts[:'origin_decade'] if !opts[:'origin_decade'].nil?
  query_params[:'curateability'] = opts[:'curateability'] if !opts[:'curateability'].nil?
  query_params[:'useCase'] = opts[:'use_case'] if !opts[:'use_case'].nil?
  query_params[:'channelSuitability'] = opts[:'channel_suitability'] if !opts[:'channel_suitability'].nil?
  query_params[:'similarToRecording'] = opts[:'similar_to_recording'] if !opts[:'similar_to_recording'].nil?
  query_params[:'songtradrTrackId'] = opts[:'songtradr_track_id'] if !opts[:'songtradr_track_id'].nil?
  query_params[:'usageName'] = opts[:'usage_name'] if !opts[:'usage_name'].nil?
  query_params[:'bpmMin'] = opts[:'bpm_min'] if !opts[:'bpm_min'].nil?
  query_params[:'bpmMax'] = opts[:'bpm_max'] if !opts[:'bpm_max'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
  query_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil?
  query_params[:'uploadEndTime'] = opts[:'upload_end_time'] if !opts[:'upload_end_time'].nil?
  query_params[:'minUploadEndTime'] = opts[:'min_upload_end_time'] if !opts[:'min_upload_end_time'].nil?
  query_params[:'maxUploadEndTime'] = opts[:'max_upload_end_time'] if !opts[:'max_upload_end_time'].nil?
  query_params[:'fingerprintStatus'] = opts[:'fingerprint_status'] if !opts[:'fingerprint_status'].nil?
  query_params[:'inferenceStatus'] = opts[:'inference_status'] if !opts[:'inference_status'].nil?
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'FileListDTO'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.user_files",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#user_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#user_folders(opts = {}) ⇒ Array<String>

Your Folders

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 20)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:

  • (Array<String>)


2517
2518
2519
2520
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2517

def user_folders(opts = {})
  data, _status_code, _headers = user_folders_with_http_info(opts)
  data
end

#user_folders_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>

Your Folders

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Zero-based page index (0..N) (default to 0)

  • :size (Integer)

    The size of the page to be returned (default to 20)

  • :sort (Array<String>)

    Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.

Returns:

  • (Array<(Array<String>, Integer, Hash)>)

    Array<String> data, response status code and response headers



2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2528

def user_folders_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_folders ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 0
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling UserApi.user_folders, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UserApi.user_folders, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/api/v1/user/folders'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
  query_params[:'sort'] = @api_client.build_collection_param(opts[:'sort'], :multi) if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<String>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.user_folders",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#user_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#user_referrers(username, opts = {}) ⇒ Array<String>

Parameters:

  • username (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<String>)


2586
2587
2588
2589
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2586

def user_referrers(username, opts = {})
  data, _status_code, _headers = user_referrers_with_http_info(username, opts)
  data
end

#user_referrers_with_http_info(username, opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>

Returns Array<String> data, response status code and response headers.

Parameters:

  • username (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<String>, Integer, Hash)>)

    Array<String> data, response status code and response headers



2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
# File 'lib/musicube_api_client_ruby/api/user_api.rb', line 2594

def user_referrers_with_http_info(username, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.user_referrers ...'
  end
  # verify the required parameter 'username' is set
  if @api_client.config.client_side_validation && username.nil?
    fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_referrers"
  end
  # resource path
  local_var_path = '/api/v1/user/referrers/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<String>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['bearer-jwt']

  new_options = opts.merge(
    :operation => :"UserApi.user_referrers",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserApi#user_referrers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end