Class: Songkick::Client
- Inherits:
-
Object
- Object
- Songkick::Client
- Defined in:
- lib/songkick/client.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#format ⇒ Object
Returns the value of attribute format.
Instance Method Summary collapse
-
#initialize(api_key, format = :json) ⇒ Client
constructor
Look at the songkick.rb file for info Songkick::Client.new == Songkick.new.
-
#json? ⇒ Boolean
Clean way to know if the format is in json.
-
#xml? ⇒ Boolean
Clean way to know if the format is in xml.
Methods included from User
#attendance, #gigography, #muted_artists, #track_artist, #track_location, #tracked_artists, #tracked_locations
Methods included from Search
#search_artists, #search_events, #search_locations, #search_venues
Methods included from Validations
Methods included from Event
Methods included from Calendar
#artist_calendar, #location_calendar, #user_calendar, #venue_calendar
Constructor Details
#initialize(api_key, format = :json) ⇒ Client
Look at the songkick.rb file for info Songkick::Client.new == Songkick.new
14 15 16 17 |
# File 'lib/songkick/client.rb', line 14 def initialize(api_key, format = :json) @api_key = api_key @format = format.to_s end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/songkick/client.rb', line 10 def api_key @api_key end |
#format ⇒ Object
Returns the value of attribute format.
10 11 12 |
# File 'lib/songkick/client.rb', line 10 def format @format end |
Instance Method Details
#json? ⇒ Boolean
Clean way to know if the format is in json
20 21 22 |
# File 'lib/songkick/client.rb', line 20 def json? format == 'json' end |
#xml? ⇒ Boolean
Clean way to know if the format is in xml
25 26 27 |
# File 'lib/songkick/client.rb', line 25 def xml? format == 'xml' end |