Class: SongtradrApiClientRuby::UserApi

Inherits:
Object
  • Object
show all
Defined in:
lib/songtradr_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/songtradr_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/songtradr_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/songtradr_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/songtradr_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/songtradr_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/songtradr_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/songtradr_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/songtradr_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/songtradr_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/songtradr_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

#init_video_upload(name, url, opts = {}) ⇒ VideoRecognitionResponse

Recognise and upload video. Responds with an object with recognition result.

Parameters:

  • name (String)

    The Name of the image that will be uploaded

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

    the optional parameters

Returns:



284
285
286
287
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 284

def init_video_upload(name, url, opts = {})
  data, _status_code, _headers = init_video_upload_with_http_info(name, url, opts)
  data
end

#init_video_upload_with_http_info(name, url, opts = {}) ⇒ Array<(VideoRecognitionResponse, Integer, Hash)>

Recognise and upload video. Responds with an object with recognition result.

Parameters:

  • name (String)

    The Name of the image that will be uploaded

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

    the optional parameters

Returns:

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

    VideoRecognitionResponse data, response status code and response headers



294
295
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
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 294

def init_video_upload_with_http_info(name, url, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.init_video_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.init_video_upload"
  end
  # verify the required parameter 'url' is set
  if @api_client.config.client_side_validation && url.nil?
    fail ArgumentError, "Missing the required parameter 'url' when calling UserApi.init_video_upload"
  end
  # resource path
  local_var_path = '/api/v1/user/file/{name}/initVideoUpload'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

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

  # 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] || 'VideoRecognitionResponse'

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

  new_options = opts.merge(
    :operation => :"UserApi.init_video_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#init_video_upload\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:



353
354
355
356
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 353

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



364
365
366
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
419
420
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 364

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

#initiate_user_image_upload(name, url, opts = {}) ⇒ ImageRecognitionResponse

Recognise and upload image. Responds with an object with recognition result.

Parameters:

  • name (String)

    The Name of the image that will be uploaded

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

    the optional parameters

Returns:



427
428
429
430
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 427

def initiate_user_image_upload(name, url, opts = {})
  data, _status_code, _headers = initiate_user_image_upload_with_http_info(name, url, opts)
  data
end

#initiate_user_image_upload_with_http_info(name, url, opts = {}) ⇒ Array<(ImageRecognitionResponse, Integer, Hash)>

Recognise and upload image. Responds with an object with recognition result.

Parameters:

  • name (String)

    The Name of the image that will be uploaded

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

    the optional parameters

Returns:

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

    ImageRecognitionResponse data, response status code and response headers



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
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 437

def initiate_user_image_upload_with_http_info(name, url, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserApi.initiate_user_image_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_image_upload"
  end
  # verify the required parameter 'url' is set
  if @api_client.config.client_side_validation && url.nil?
    fail ArgumentError, "Missing the required parameter 'url' when calling UserApi.initiate_user_image_upload"
  end
  # resource path
  local_var_path = '/api/v1/user/file/{name}/initImageUpload'.sub('{' + 'name' + '}', CGI.escape(name.to_s))

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

  # 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] || 'ImageRecognitionResponse'

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

  new_options = opts.merge(
    :operation => :"UserApi.initiate_user_image_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_image_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:



494
495
496
497
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 494

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



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

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:



559
560
561
562
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 559

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



567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 567

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:



623
624
625
626
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 623

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:



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 640

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:



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

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:



725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 725

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.

  • :party_and_title (String)

    Search for party and 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:



847
848
849
850
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 847

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.

  • :party_and_title (String)

    Search for party and 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



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
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
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
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
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
1161
1162
1163
1164
1165
1166
1167
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 916

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[:'partyAndTitle'] = opts[:'party_and_title'] if !opts[:'party_and_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:



1173
1174
1175
1176
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1173

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



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
1227
1228
1229
1230
1231
1232
1233
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1182

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:



1239
1240
1241
1242
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1239

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



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
1299
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1248

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)


1305
1306
1307
1308
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1305

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



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
1360
1361
1362
1363
1364
1365
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1314

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)


1372
1373
1374
1375
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1372

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



1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1382

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:



1443
1444
1445
1446
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1443

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



1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1452

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.

  • :party_and_title (String)

    Search for party and 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:



1563
1564
1565
1566
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1563

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:



1940
1941
1942
1943
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1940

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 data, response status code and response headers



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
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
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
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2002

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:



2232
2233
2234
2235
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2232

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 data, response status code and response headers



2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2241

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:



2349
2350
2351
2352
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2349

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



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
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
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
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
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
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2413

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.

  • :party_and_title (String)

    Search for party and 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



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
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 1631

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[:'partyAndTitle'] = opts[:'party_and_title'] if !opts[:'party_and_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>)


2659
2660
2661
2662
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2659

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 data, response status code and response headers



2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2670

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>)


2728
2729
2730
2731
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2728

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 data, response status code and response headers.

Parameters:

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

    the optional parameters

Returns:

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

    Array data, response status code and response headers



2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
# File 'lib/songtradr_api_client_ruby/api/user_api.rb', line 2736

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