Class: EventFindaRuby::Locations
- Inherits:
-
Base
- Object
- Base
- EventFindaRuby::Locations
show all
- Defined in:
- lib/event_finda_ruby/locations.rb
Constant Summary
collapse
- RESOURCE_SLUG =
"locations".freeze
Constants inherited
from Base
Base::BASE_URL
Instance Attribute Summary
Attributes inherited from Base
#api_extension, #filters
Instance Method Summary
collapse
Methods inherited from Base
#by_keywords_and, #by_keywords_or, #by_query, #by_rows, #initialize, #results, #url, #with_extension
Constructor Details
This class inherits a constructor from Base
Instance Method Details
#by_featured ⇒ Object
6
7
8
9
10
|
# File 'lib/event_finda_ruby/locations.rb', line 6
def by_featured
apply_filter "featured", 1
self
end
|
#by_location(location) ⇒ Object
12
13
14
15
16
|
# File 'lib/event_finda_ruby/locations.rb', line 12
def by_location(location)
apply_filter "location", location
self
end
|
#by_location_slug(slug) ⇒ Object
18
19
20
21
22
|
# File 'lib/event_finda_ruby/locations.rb', line 18
def by_location_slug(slug)
apply_filter "location_slug", slug
self
end
|
#by_point(point) ⇒ Object
24
25
26
27
28
|
# File 'lib/event_finda_ruby/locations.rb', line 24
def by_point(point)
apply_filter "point", point
self
end
|
#by_radius(radius) ⇒ Object
30
31
32
33
34
|
# File 'lib/event_finda_ruby/locations.rb', line 30
def by_radius(radius)
apply_filter "distance", radius
self
end
|
#by_venue(value) ⇒ Object
36
37
38
39
40
41
42
|
# File 'lib/event_finda_ruby/locations.rb', line 36
def by_venue(value)
if ["true", "false"].include? value
apply_filter "venue", value
end
self
end
|
#sort_by(option) ⇒ Object
44
45
46
47
48
|
# File 'lib/event_finda_ruby/locations.rb', line 44
def sort_by(option)
apply_filter "order", option
self
end
|
#with_level(level) ⇒ Object
50
51
52
53
54
|
# File 'lib/event_finda_ruby/locations.rb', line 50
def with_level(level)
apply_filter "levels", level
self
end
|