Class: SeatGeek::BuildQuery

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

Class Method Summary collapse

Class Method Details

.build(options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/seat_geek/build_query.rb', line 4

def self.build(options)
  query = ""
  if options[:month_of_the_year]
    query = month_query(options[:month_of_the_year])
  end
  if options[:state]
    query = query + location_query(options[:state])
  end
  if options[:attendee_count]
    query = query + attendee_count_query(options[:attendee_count])
  end
  if options[:event_type]
    query = query + event_type_query(options[:event_type])
  end
  options[:base_url] + query
end