Module: Ronnie::Client::Tracks

Included in:
Ronnie::Client
Defined in:
lib/ronnie/client/tracks.rb

Instance Method Summary collapse

Instance Method Details

#find_tracks_by_artist(artist_id, options = {}) ⇒ Object

Find Tracks by Artist

Examples:

Ronnie.find_tracks_by_artist('r235282')

Parameters:

  • artist_id (String)


9
10
11
# File 'lib/ronnie/client/tracks.rb', line 9

def find_tracks_by_artist(artist_id, options={})
  post('getTracksForArtist', { artist: artist_id })
end

#find_tracks_by_isrc(isrc, options = {}) ⇒ Object

Find Tracks by ISRC

Examples:

Ronnie.find_tracks_by_isrc('GBAYE0200771')

Parameters:

  • isrc (String)


18
19
20
# File 'lib/ronnie/client/tracks.rb', line 18

def find_tracks_by_isrc(isrc, options={})
  post('getTracksByISRC', { isrc: isrc })
end

#search_tracks(query, options = {}) ⇒ Object

Search Tracks

Examples:

Ronnie.search_tracks('Through The Trees pt. 2')

Parameters:

  • query (String)


27
28
29
# File 'lib/ronnie/client/tracks.rb', line 27

def search_tracks(query, options={})
  post('search', { query: query, types: 'Track' })
end

#top_tracks(options = {}) ⇒ Object

retrieve the site-wide most popular tracks.

Examples:

Ronnie.top_tracks


35
36
37
# File 'lib/ronnie/client/tracks.rb', line 35

def top_tracks(options={})
  post('getTopCharts', { type: "Track" })
end