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
Reach out to [email protected] to receive a free account or use your login data if you are already signed up.
To authenticate, you need to login via the POST /api/v1/user/login endpoint.
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
- 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.
- You can check the processing status of your file via the GET /api/v1/user/file/name/filesStatus endpoint.
- 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.
- 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.
- 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: 2.0.0
- Package version: 2.0.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-2.0.0.gem
(for development, run gem install --dev ./songtradr_api_client_ruby-2.0.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', '~> 2.0.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::RecordingApi | prompt_search_recordings | GET /api/v1/public/recording/promptSearch | Recordings for query. |
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::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 | prompt_search_user_files | GET /api/v1/user/promptSearch | Files for query. |
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 | 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
- SongtradrApiClientRuby::CategoryMediumDTO
- SongtradrApiClientRuby::CategoryMinimalDTO
- SongtradrApiClientRuby::ConfigAccessDTO
- SongtradrApiClientRuby::ConfigIdentifierDTO
- SongtradrApiClientRuby::ContributorTypeDTO
- SongtradrApiClientRuby::ErrorResponse
- SongtradrApiClientRuby::FieldSummaryDTO
- SongtradrApiClientRuby::FileDTO
- SongtradrApiClientRuby::FileListDTO
- SongtradrApiClientRuby::FileSmallDTO
- SongtradrApiClientRuby::FileUploadDTO
- SongtradrApiClientRuby::FileWIthUrlDTO
- SongtradrApiClientRuby::FilesSummaryDTO
- SongtradrApiClientRuby::ForgotPasswordDTO
- SongtradrApiClientRuby::GenreDTO
- SongtradrApiClientRuby::GenreMinimalDTO
- SongtradrApiClientRuby::GenresSummaryDTO
- SongtradrApiClientRuby::ImageRecognitionResponse
- SongtradrApiClientRuby::InitPutRecordingAudioDTO
- SongtradrApiClientRuby::JwtTokenDTO
- SongtradrApiClientRuby::LoginDTO
- SongtradrApiClientRuby::MusicalFeaturesDTO
- SongtradrApiClientRuby::PartySmallDTO
- SongtradrApiClientRuby::RecordingForSimilaritySearchDTO
- SongtradrApiClientRuby::RecordingGenrePredictionDTO
- SongtradrApiClientRuby::RecordingListDTO
- SongtradrApiClientRuby::RecordingMediumDTO
- SongtradrApiClientRuby::RecordingMinimalWithMusicalFeaturesDTO
- SongtradrApiClientRuby::RecordingMinimalWithTaggramsDTO
- SongtradrApiClientRuby::RecordingMinimalWithTagstrengthsDTO
- SongtradrApiClientRuby::RecordingPartyDTO
- SongtradrApiClientRuby::RecordingSmallDTO
- SongtradrApiClientRuby::RecordingTagSmallDTO
- SongtradrApiClientRuby::SaveUserDTO
- SongtradrApiClientRuby::SearchFilterValuesDTO
- SongtradrApiClientRuby::SignUpDTO
- SongtradrApiClientRuby::TagDTO
- SongtradrApiClientRuby::TagSmallDTO
- SongtradrApiClientRuby::TaggramDTO
- SongtradrApiClientRuby::TagsSummaryDTO
- SongtradrApiClientRuby::TagstrengthDTO
- SongtradrApiClientRuby::TitleDTO
- SongtradrApiClientRuby::TokenRequest
- SongtradrApiClientRuby::TrackDTO
- SongtradrApiClientRuby::UpdatePasswordDTO
- SongtradrApiClientRuby::UserDTO
- SongtradrApiClientRuby::VideoRecognitionResponse
Documentation for Authorization
Authentication schemes defined for the API:
bearer-jwt
- Type: Bearer authentication (JWT)