Skip to content
This repository
Newer
Older
100644 18 lines (14 sloc) 0.564 kb
2ea09978 »
2010-05-19 event caching resolved, import from zvents (must run rake gems:instal…
1 require 'zvent'
2 module Zvent
3 # A zvent session used to search and everything
4 class Session < Base
e38d3d44 »
2012-01-14 Rails 3 Updates
5 def find_events_by_date(date, zvent_options = {}, options = {})
2ea09978 »
2010-05-19 event caching resolved, import from zvents (must run rake gems:instal…
6 #location is required
7 raise Zvent::NoLocationError.new if !date || date.strip.empty?
e38d3d44 »
2012-01-14 Rails 3 Updates
8
2ea09978 »
2010-05-19 event caching resolved, import from zvents (must run rake gems:instal…
9 #grab the json from zvents
10 json_ret = get_resources(@base_url+"/search?#{zvent_options.merge(:when => date).merge(ZVENTS_DEFAULT_ARGUMENTS).to_query}")
e38d3d44 »
2012-01-14 Rails 3 Updates
11
2ea09978 »
2010-05-19 event caching resolved, import from zvents (must run rake gems:instal…
12 #return the json or objectified json
13 options[:as_json] ? json_ret : objectify_zvents_json(json_ret)
14 end
15 end
e38d3d44 »
2012-01-14 Rails 3 Updates
16
17 end
Something went wrong with that request. Please try again.