Class: Echonest::Genre
- Inherits:
-
Base
- Object
- Base
- Echonest::Genre
show all
- Defined in:
- lib/echonest-ruby-api/genre.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
base_uri, #endpoint, #entity_name, #get, get_api_endpoint, #get_response, version, #which
Constructor Details
#initialize(api_key, name = nil) ⇒ Genre
Returns a new instance of Genre.
9
10
11
12
|
# File 'lib/echonest-ruby-api/genre.rb', line 9
def initialize(api_key, name = nil)
@api_key = api_key
@name = name
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
7
8
9
|
# File 'lib/echonest-ruby-api/genre.rb', line 7
def name
@name
end
|
Class Method Details
.list(api_key, options = {}) ⇒ Object
26
27
28
|
# File 'lib/echonest-ruby-api/genre.rb', line 26
def self.list(api_key, options = {})
Base.get_api_endpoint(api_key, 'genre/list', options)
end
|
.search(api_key, options = {}) ⇒ Object
30
31
32
|
# File 'lib/echonest-ruby-api/genre.rb', line 30
def self.search(api_key, options = {})
Base.get_api_endpoint(api_key, 'genre/search', options)
end
|
Instance Method Details
#artists(options = {}) ⇒ Object
14
15
16
|
# File 'lib/echonest-ruby-api/genre.rb', line 14
def artists(options = {})
get_response(options.merge(name: @name))
end
|
#profile(options = {}) ⇒ Object
18
19
20
|
# File 'lib/echonest-ruby-api/genre.rb', line 18
def profile(options = {})
get_response(options.merge(name: @name))
end
|
#similar(options = {}) ⇒ Object
22
23
24
|
# File 'lib/echonest-ruby-api/genre.rb', line 22
def similar(options = {})
get_response(options.merge(name: @name))
end
|