songtradr_api_client_ruby

SongtradrApiClientRuby - 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.17.0
  • Package version: 1.17.0
  • 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 songtradr_api_client_ruby.gemspec

Then either install the gem locally:

gem install ./songtradr_api_client_ruby-1.17.0.gem

(for development, run gem install --dev ./songtradr_api_client_ruby-1.17.0.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 'songtradr_api_client_ruby', '~> 1.17.0'

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 'songtradr_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 'songtradr_api_client_ruby'

api_instance = SongtradrApiClientRuby::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 SongtradrApiClientRuby::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
SongtradrApiClientRuby::AllowedValuesApi allowed_musical_features GET /api/v1/allowedValues/musicalFeatures Allowed values for music descriptive parameters to be used in the searchAll endpoint.
SongtradrApiClientRuby::AllowedValuesApi genres GET /api/v1/allowedValues/genre Allowed values for genres.
SongtradrApiClientRuby::AllowedValuesApi tags GET /api/v1/allowedValues/tag All descriptive tags inside of tag-categories.
SongtradrApiClientRuby::PlaylistApi curate_playlist POST /api/v1/playlist/methodName Curate playlist.
SongtradrApiClientRuby::RecordingApi recordings_by_ids_with_musical_features GET /api/v1/public/recording/ids/musicalFeatures AI generated moods, musical features and more for recordings.
SongtradrApiClientRuby::RecordingApi recordings_by_ids_with_similarities GET /api/v1/public/recording/ids/similarities Similar recordings for a list of recordings.
SongtradrApiClientRuby::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.
SongtradrApiClientRuby::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.
SongtradrApiClientRuby::RecordingApi recordings_medium_by_ids GET /api/v1/public/recording/m/ids Recordings by IDs with a medium sized response.
SongtradrApiClientRuby::RecordingApi search_recordings GET /api/v1/public/recording/search Recordings by contributors, moods, musical features and more.
SongtradrApiClientRuby::RecordingApi search_recordings_granular POST /api/v1/public/recording/searchGranular Recordings by granular search options.
SongtradrApiClientRuby::UserApi delete_user_file DELETE /api/v1/user/file/objectKey Delete file.
SongtradrApiClientRuby::UserApi edit_me POST /api/v1/user/me Edit details for a logged-in user
SongtradrApiClientRuby::UserApi forgot_password POST /api/v1/user/forgot-password Send a password reset email
SongtradrApiClientRuby::UserApi init_video_upload POST /api/v1/user/file/name/initVideoUpload Recognise and upload video. Responds with an object with recognition result.
SongtradrApiClientRuby::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.
SongtradrApiClientRuby::UserApi initiate_user_image_upload POST /api/v1/user/file/name/initImageUpload Recognise and upload image. Responds with an object with recognition result.
SongtradrApiClientRuby::UserApi login POST /api/v1/user/login Login to generate a bearer token.
SongtradrApiClientRuby::UserApi me GET /api/v1/user/me Details for a logged-in user
SongtradrApiClientRuby::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.
SongtradrApiClientRuby::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.
SongtradrApiClientRuby::UserApi save_playlist POST /api/v1/user/savePlaylist List, search and create playlist of your own files.
SongtradrApiClientRuby::UserApi sign_up POST /api/v1/user/sign-up Sign up a new user.
SongtradrApiClientRuby::UserApi token POST /api/v1/user/token Generates a new JWT token for the given refresh token
SongtradrApiClientRuby::UserApi update_password POST /api/v1/user/update-password Update password by using the password reset token
SongtradrApiClientRuby::UserApi user_file GET /api/v1/user/file/objectKey Details and a download link for a file.
SongtradrApiClientRuby::UserApi user_files GET /api/v1/user/files List and search your own files.
SongtradrApiClientRuby::UserApi user_files_status GET /api/v1/user/filesStatus Status details for files.
SongtradrApiClientRuby::UserApi user_files_summary GET /api/v1/user/filesSummary Summary fo your files.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

bearer-jwt

  • Type: Bearer authentication (JWT)