Class: Spotted::Resources::AudioFeatures

Inherits:
Object
  • Object
show all
Defined in:
lib/spotted/resources/audio_features.rb

Instance Method Summary collapse

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.

Parameters:



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.

Parameters:

  • ids (String)

    A comma-separated list of the [Spotify IDs](/documentation/web-api/concepts/spot

  • request_options (Spotted::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



48
49
50
51
52
53
54
55
56
57
# File 'lib/spotted/resources/audio_features.rb', line 48

def list(params)
  parsed, options = Spotted::AudioFeatureListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "audio-features",
    query: parsed,
    model: Spotted::Models::AudioFeatureListResponse,
    options: 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.

Parameters:

  • id (String)

    The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the track

  • request_options (Spotted::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



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