Module: Songkickr::RemoteApi::UserEventsAndTrackings

Included in:
Songkickr::Remote
Defined in:
lib/songkickr/remote_api/user_events_and_trackings.rb

Instance Method Summary collapse

Instance Method Details

#users_artist_tracking(username, artist_id) ⇒ Object

User Artist Tracking

www.songkick.com/developer/trackings

Parameters

  • username - A Songkick username.

  • artist_id - A Songkick artist ID.


85
86
87
88
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 85

def users_artist_tracking(username, artist_id)
  result = get("/users/#{username}/trackings/artist:#{artist_id}.json")
  Songkickr::ArtistResult.new result
end

#users_attendance(username, event_id) ⇒ Object

User Attendance

www.songkick.com/developer/trackings

Parameters

  • username - A Songkick username.

  • event_id - A Songkick event/concert ID.


137
138
139
140
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 137

def users_attendance(username, event_id)
  result = get("/users/#{username}/trackings/event:#{event_id}.json")
  Songkickr::TrackingResult.new result
end

#users_attendance_calendar(username, query = {}) ⇒ Object

User Attendance Calendar

Returns a list of calendar entries with events that a user is planning to attend. /users/#username/calendar.json?reason=attendance

Parameters

  • username - A Songkick username.

  • query - A hash of query parameters, see below for options.

Query Parameters

  • page - Page number

  • per_page - Number of results per page, max 50.


31
32
33
34
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 31

def users_attendance_calendar(username, query = {})
  result = get("/users/#{username}/calendar.json?reason=attendance", query: query)
  Songkickr::CalendarResult.new result
end

#users_events(username, query = {}) ⇒ Object

User Events API

www.songkick.com/developer/upcoming-events-for-user

Parameters

  • username - A Songkick username.

  • query - A hash of query parameters, see below for options.

Query Parameters

  • page - Page number

  • per_page - Number of results per page, max 50.

  • attendance (all, im_going, i_might_go) - defaults to im_going

  • type (concert or festival)

  • artists (events by any of the artists, comma-separated)

  • artist_id - Songkick unique ID for an artist

  • venue_id - Songkick unique ID for a venue

  • setlist_item_name (name of a song which was played at the event – use with artist_id or artist_name)

  • min_date - Oldest date for which you want to look for events

  • max_date - Most recent date for which you want to look for events

  • location - see the Songkick website for instructions on how to use the location parameter

  • order - 'asc' or 'desc', 'asc' by default

  • created_after - timestamp using ISO8601 format, e.g. 2012-02-29T13:37:00Z


126
127
128
129
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 126

def users_events(username, query = {})
  result = get("/users/#{username}/events.json", query: query)
  Songkickr::EventResult.new result
end

#users_metro_area_tracking(username, metro_area_id, query = {}) ⇒ Object

User Metro Area Tracking

www.songkick.com/developer/trackings

Parameters

  • username - A Songkick username.

  • metro_area_id - A Songkick metro area ID.

  • query - A hash of query parameters, see below for options.


59
60
61
62
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 59

def users_metro_area_tracking(username, metro_area_id, query = {})
  result = get("/users/#{username}/trackings/metro_area:#{metro_area_id}.json", query: query)
  Songkickr::MetroAreaResult.new result
end

#users_muted_artists(username, query = {}) ⇒ Object

User Muted Artists

www.songkick.com/developer/trackings

Parameters

  • username - A Songkick username.

  • query - A hash of query parameters, see below for options.

Query Parameters

  • page - Page number

  • per_page - Number of results per page, max 50.


100
101
102
103
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 100

def users_muted_artists(username, query = {})
  result = get("/users/#{username}/artists/muted.json", query: query)
  Songkickr::ArtistResult.new result
end

#users_tracked_artists(username, query = {}) ⇒ Object

User Tracked Artists

www.songkick.com/developer/trackings

Parameters

  • username - A Songkick username.

  • query - A hash of query parameters, see below for options.

Query Parameters

  • page - Page number

  • per_page - Number of results per page, max 50.


74
75
76
77
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 74

def users_tracked_artists(username, query = {})
  result = get("/users/#{username}/artists/tracked.json", query: query)
  Songkickr::ArtistResult.new result
end

#users_tracked_events_calendar(username, query = {}) ⇒ Object

Users Tracked Events Calendar

Returns a list of calendar entries with events for a user's tracked artists in her tracked metro areas. /users/#username/calendar.json?reason=tracked_artist

Parameters

  • username - A Songkick username.

  • query - A hash of query parameters, see below for options.

Query Parameters

  • page - Page number

  • per_page - Number of results per page, max 50.


15
16
17
18
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 15

def users_tracked_events_calendar(username, query = {})
  result = get("/users/#{username}/calendar.json?reason=tracked_artist", query: query)
  Songkickr::CalendarResult.new result
end

#users_tracked_metro_areas(username, query = {}) ⇒ Object

User Tracked Metro Areas

www.songkick.com/developer/trackings

Parameters

  • username - A Songkick username.

  • query - A hash of query parameters, see below for options.

Query Parameters

  • page - Page number

  • per_page - Number of results per page, max 50.


47
48
49
50
# File 'lib/songkickr/remote_api/user_events_and_trackings.rb', line 47

def users_tracked_metro_areas(username, query = {})
  result = get("/users/#{username}/metro_areas/tracked.json", query: query)
  Songkickr::MetroAreaResult.new result
end