musicube_api_client_ruby

MusicubeApiClientRuby - the Ruby gem for the Songtradr API

This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging.

You can also use the API to manage your account and musicube cloud data.

Authentication

  1. Reach out to [email protected] to receive a free account or use your login data if you are already signed up.

  2. To authenticate, you need to login via the POST /api/v1/user/login endpoint.

  3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token.

Rate Limiting

The current limit is 120 Requests per minute. Reach out to us via [email protected] if you need to request more.

Getting Started with auto-tagging

  1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/name/initUpload endpoint. It responds with a presigned S3 link where you can upload your file.
  2. You can check the processing status of your file via the GET /api/v1/user/file/name/filesStatus endpoint.
  3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint.

Getting Started with search

You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints.

  1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters.
  2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.12.21
  • Package version: 1.1.5
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://songtradr.com

Installation

Build a gem

To build the Ruby code into a gem:

gem build musicube_api_client_ruby.gemspec

Then either install the gem locally:

gem install ./musicube_api_client_ruby-1.1.5.gem

(for development, run gem install --dev ./musicube_api_client_ruby-1.1.5.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'musicube_api_client_ruby', '~> 1.1.5'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'musicube_api_client_ruby', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'musicube_api_client_ruby'

api_instance = MusicubeApiClientRuby::AllowedValuesApi.new
opts = {
  response_size: 's' # String | Size the response should have.
}

begin
  #Allowed values for music descriptive parameters to be used in the searchAll endpoint.
  result = api_instance.allowed_musical_features(opts)
  p result
rescue MusicubeApiClientRuby::ApiError => e
  puts "Exception when calling AllowedValuesApi->allowed_musical_features: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.songtradr.com

Class Method HTTP request Description
MusicubeApiClientRuby::AllowedValuesApi allowed_musical_features GET /api/v1/allowedValues/musicalFeatures Allowed values for music descriptive parameters to be used in the searchAll endpoint.
MusicubeApiClientRuby::AllowedValuesApi genres GET /api/v1/allowedValues/genre Allowed values for genres.
MusicubeApiClientRuby::AllowedValuesApi tags GET /api/v1/allowedValues/tag All descriptive tags inside of tag-categories.
MusicubeApiClientRuby::PartyApi party GET /api/v1/party Information on a person, group or company.
MusicubeApiClientRuby::PlaylistApi all_playlists GET /api/v1/playlist All playlists.
MusicubeApiClientRuby::PlaylistApi create_or_update_playlist POST /api/v1/playlist Create and edit playlist.
MusicubeApiClientRuby::PlaylistApi delete_playlist DELETE /api/v1/playlist/songtradrPlaylistGuid Delete playlist.
MusicubeApiClientRuby::RecordingApi recordings_by_ids_with_musical_features GET /api/v1/public/recording/ids/musicalFeatures AI generated moods, musical features and more for recordings.
MusicubeApiClientRuby::RecordingApi recordings_by_ids_with_similarities GET /api/v1/public/recording/ids/similarities Similar recordings for a list of recordings.
MusicubeApiClientRuby::RecordingApi recordings_by_ids_with_taggrams GET /api/v1/public/recording/ids/taggrams Timeseries of AI generated moods, musical features and more for a list of recordings.
MusicubeApiClientRuby::RecordingApi recordings_by_ids_with_tagstrengths GET /api/v1/public/recording/ids/tagstrengths Strengths as numerical representations for AI generated moods, musical features and more for recordings.
MusicubeApiClientRuby::RecordingApi recordings_large_by_ids GET /api/v1/public/recording/l/ids Recordings by IDs with a large response.
MusicubeApiClientRuby::RecordingApi recordings_medium_by_ids GET /api/v1/public/recording/m/ids Recordings by IDs with a medium sized response.
MusicubeApiClientRuby::RecordingApi recordings_small_by_ids GET /api/v1/public/recording/s/ids Recordings by IDs with a small response.
MusicubeApiClientRuby::RecordingApi search_recordings GET /api/v1/public/recording/search Recordings by contributors, moods, musical features and more.
MusicubeApiClientRuby::RecordingApi search_recordings_granular POST /api/v1/public/recording/searchGranular Recordings by granular search options.
MusicubeApiClientRuby::RecordingApi search_recordings_granular_abstraction POST /api/v1/public/recording/searchGranularAbstraction Recordings by abstracted wordings and granular search options.
MusicubeApiClientRuby::UserApi create_user_referrer POST /api/v1/user/referrers/new
MusicubeApiClientRuby::UserApi delete_user_file DELETE /api/v1/user/file/objectKey Delete file.
MusicubeApiClientRuby::UserApi edit_me POST /api/v1/user/me Edit details for a logged-in user
MusicubeApiClientRuby::UserApi forgot_password POST /api/v1/user/forgot-password Send a password reset email
MusicubeApiClientRuby::UserApi initiate_user_file_upload POST /api/v1/user/file/name/initUpload Initialize a file upload. Responds with an URL where the file can be uploaded.
MusicubeApiClientRuby::UserApi login POST /api/v1/user/login Login to generate a bearer token.
MusicubeApiClientRuby::UserApi me GET /api/v1/user/me Details for a logged-in user
MusicubeApiClientRuby::UserApi recordings_by_folder_with_taggrams GET /api/v1/user/folder/folderName/taggrams Timeseries of AI generated moods, musical features and more for recordings in your folder.
MusicubeApiClientRuby::UserApi recordings_by_folder_with_tagstrengths GET /api/v1/user/folder/folderName/tagstrengths Strengths as numerical representations for AI generated moods, musical features and more for recordings in your folder.
MusicubeApiClientRuby::UserApi save_playlist POST /api/v1/user/savePlaylist List, search and create playlist of your own files.
MusicubeApiClientRuby::UserApi sign_up POST /api/v1/user/sign-up Sign up a new user.
MusicubeApiClientRuby::UserApi token POST /api/v1/user/token Generates a new JWT token for the given refresh token
MusicubeApiClientRuby::UserApi update_password POST /api/v1/user/update-password Update password by using the password reset token
MusicubeApiClientRuby::UserApi update_user_file_recording POST /api/v1/user/file/objectKey Create and edit metadata of your files.
MusicubeApiClientRuby::UserApi user_file GET /api/v1/user/file/objectKey Details and a download link for a file.
MusicubeApiClientRuby::UserApi user_files GET /api/v1/user/files List and search your own files.
MusicubeApiClientRuby::UserApi user_files_download GET /api/v1/user/filesDownload Download links for your files
MusicubeApiClientRuby::UserApi user_files_status GET /api/v1/user/filesStatus Status details for files.
MusicubeApiClientRuby::UserApi user_files_summary GET /api/v1/user/filesSummary Summary fo your files.
MusicubeApiClientRuby::UserApi user_folders GET /api/v1/user/folders Your Folders
MusicubeApiClientRuby::UserApi user_referrers GET /api/v1/user/referrers/username

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearer-jwt

  • Type: Bearer authentication (JWT)