Class: BandPage::Client
- Inherits:
-
Object
- Object
- BandPage::Client
- Defined in:
- lib/band_page/client.rb
Constant Summary collapse
- CONNECTIONS =
[:emails, :events, :genres, :tracks, :photos, :videos, :websites]
- BASE_URL =
'https://api-read.bandpage.com/'
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #band ⇒ Object
-
#initialize(config) ⇒ Client
constructor
A new instance of Client.
- #method_missing(m, *args, &block) ⇒ Object
Constructor Details
#initialize(config) ⇒ Client
Returns a new instance of Client.
10 11 12 |
# File 'lib/band_page/client.rb', line 10 def initialize(config) @config = config end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
18 19 20 21 |
# File 'lib/band_page/client.rb', line 18 def method_missing(m, *args, &block) return get(m) if CONNECTIONS.include?(m) super end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
9 10 11 |
# File 'lib/band_page/client.rb', line 9 def config @config end |
#token ⇒ Object
Returns the value of attribute token.
9 10 11 |
# File 'lib/band_page/client.rb', line 9 def token @token end |
Instance Method Details
#band ⇒ Object
14 15 16 |
# File 'lib/band_page/client.rb', line 14 def band get end |