Object
A single set list by an artist.
{
"displayName": "N.E.R.D. at Glastonbury Festival 2009", "artist": { "uri": "http://www.songkick.com/artists/387012-nerd?utm_source=791&utm_medium=partner" "identifier": [ { "href": "http://api.songkick.com/api/3.0/artists/mbid:3fb49f5a-fdc0-4789-9c84-22b38b3f3cb5.json" "mbid": "3fb49f5a-fdc0-4789-9c84-22b38b3f3cb5" } ] "displayName": "N.E.R.D." "id": 387012 }, "id": 9511, "setlistItem": []
}
Takes the setlist hash and parses out an Event and Artist and an array of SetlistItems.
# File lib/songkickr/setlist.rb, line 24 def initialize(setlist_hash) @event = Songkickr::Event.new setlist_hash["event"] @setlist_items = parse_setlist_items setlist_hash["setlistItem"] @artist = Songkickr::Artist.new setlist_hash["artist"] @playlist_uri = setlist_hash["playlistUri"] @display_name = setlist_hash["displayName"] @id = setlist_hash["id"] end
Takes the array of setlist items and create SetLists
# File lib/songkickr/setlist.rb, line 36 def parse_setlist_items(setlist_item_array = nil) setlist_items = [] if setlist_item_array setlist_item_array.each do |item| setlist_items << Songkickr::SetlistItem.new(item) end end setlist_items end
Generated with the Darkfish Rdoc Generator 2.