Class: Spotted::Resources::AudioAnalysis

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ AudioAnalysis

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 AudioAnalysis.

Parameters:



36
37
38
# File 'lib/spotted/resources/audio_analysis.rb', line 36

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(id, request_options: {}) ⇒ Spotted::Models::AudioAnalysisRetrieveResponse

Deprecated.

Some parameter documentations has been truncated, see Models::AudioAnalysisRetrieveParams for more details.

Get a low-level audio analysis for a track in the Spotify catalog. The audio analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre.

Parameters:

  • id (String)

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

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

Returns:

See Also:



24
25
26
27
28
29
30
31
# File 'lib/spotted/resources/audio_analysis.rb', line 24

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["audio-analysis/%1$s", id],
    model: Spotted::Models::AudioAnalysisRetrieveResponse,
    options: params[:request_options]
  )
end