3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/seat_geek/build_query.rb', line 3
def self.build(options, base_url)
query = ""
if !base_url.match(/\?/)
query = "?"
end
if options[:month_of_the_year]
query = 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
base_url + query
end
|