class Evtfl::Concerts
Attributes
city[R]
country[R]
id[R]
title[R]
url[R]
Public Class Methods
list(id)
click to toggle source
# File lib/evtfl/concerts.rb, line 5 def self.list(id) url = "#{PRE}/events/list?app_key=#{Evtfl.api_key}&id=#{id}&page_size=100" uri = URI(url) response = Net::HTTP.get(uri) result = JSON.parse(response) result['event'].map { |show| new(show) } end
new(args = {})
click to toggle source
# File lib/evtfl/concerts.rb, line 15 def initialize(args = {}) @country = args['country'] @city = args['city'] @url = args['url'] @title = args['title'] @id = args['id'] end