Class: SeatGeek::Taxonomy

Inherits:
Object
  • Object
show all
Defined in:
lib/seat_geek/taxonomy.rb

Constant Summary collapse

PUBLIC_API_URL =
'https://api.seatgeek.com/2/taxonomies'
SPORTS_ID =
1000000
CONCERT_ID =
2000000
THEATRE_ID =
3000000

Instance Method Summary collapse

Constructor Details

#initializeTaxonomy

Returns a new instance of Taxonomy.



8
9
10
11
# File 'lib/seat_geek/taxonomy.rb', line 8

def initialize
  @base_url = PUBLIC_API_URL
  @taxonomies = parse_response(typhoeus_request.body)
end

Instance Method Details

#allObject



13
14
15
# File 'lib/seat_geek/taxonomy.rb', line 13

def all
  taxonomies
end

#concertObject



21
22
23
# File 'lib/seat_geek/taxonomy.rb', line 21

def concert
  taxonomies_tree.concert
end

#sportsObject



17
18
19
# File 'lib/seat_geek/taxonomy.rb', line 17

def sports
  taxonomies_tree.sports
end

#theaterObject



25
26
27
# File 'lib/seat_geek/taxonomy.rb', line 25

def theater
  taxonomies_tree.theater
end