Class: Dance::Genres

Inherits:
Client show all
Defined in:
lib/dance/genres.rb

Class Method Summary collapse

Methods inherited from Client

#artists, #genres, #initialize, #tracks, #users

Constructor Details

This class inherits a constructor from Dance::Client

Class Method Details

.allObject

Returns a list of all of the genres. GET /genres



6
7
8
# File 'lib/dance/genres.rb', line 6

def self.all
  get('/genres')
end

.artists(id) ⇒ Object

Returns a list of artists that have tracks under the given genre. GET /genres/:id/artists



24
25
26
# File 'lib/dance/genres.rb', line 24

def self.artists(id)
  get('/genres/' + id.to_s + '/artists')
end

.info(id) ⇒ Object

Returns information on the given genre. GET /genres/:id



12
13
14
# File 'lib/dance/genres.rb', line 12

def self.info(id)
  get('/genres/' + id.to_s)
end

.tracks(id) ⇒ Object

Returns a list of tracks under the given genre. GET /genres/:id/tracks



18
19
20
# File 'lib/dance/genres.rb', line 18

def self.tracks(id)
  get('/genres/' + id.to_s + '/tracks')
end