Class: Spotted::Resources::AudioFeatures
- Inherits:
-
Object
- Object
- Spotted::Resources::AudioFeatures
- Defined in:
- lib/spotted/resources/audio_features.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ AudioFeatures
constructor
private
A new instance of AudioFeatures.
- #list(ids: , request_options: {}) ⇒ Spotted::Models::AudioFeatureListResponse deprecated Deprecated.
- #retrieve(id, request_options: {}) ⇒ Spotted::Models::AudioFeatureRetrieveResponse deprecated Deprecated.
Constructor Details
#initialize(client:) ⇒ AudioFeatures
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of AudioFeatures.
62 63 64 |
# File 'lib/spotted/resources/audio_features.rb', line 62 def initialize(client:) @client = client end |
Instance Method Details
#list(ids: , request_options: {}) ⇒ Spotted::Models::AudioFeatureListResponse
Deprecated.
Some parameter documentations has been truncated, see Models::AudioFeatureListParams for more details.
Get audio features for multiple tracks based on their Spotify IDs.
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/spotted/resources/audio_features.rb', line 48 def list(params) parsed, = Spotted::AudioFeatureListParams.dump_request(params) @client.request( method: :get, path: "audio-features", query: parsed, model: Spotted::Models::AudioFeatureListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ Spotted::Models::AudioFeatureRetrieveResponse
Deprecated.
Some parameter documentations has been truncated, see Models::AudioFeatureRetrieveParams for more details.
Get audio feature information for a single track identified by its unique Spotify ID.
23 24 25 26 27 28 29 30 |
# File 'lib/spotted/resources/audio_features.rb', line 23 def retrieve(id, params = {}) @client.request( method: :get, path: ["audio-features/%1$s", id], model: Spotted::Models::AudioFeatureRetrieveResponse, options: params[:request_options] ) end |