module EventRegistryApi::Client::Events
The events api.
Public Instance Methods
events(concept, location=nil, start_date=nil, end_date=nil, options={})
click to toggle source
Get a list of events given a concept and some parameters. @param {String} @param {String} @param {Date} @param {Date} @param {Hash} @return {Array}
# File lib/event_registry_api/client/events.rb, line 18 def events (concept, location=nil, start_date=nil, end_date=nil, options={}) options = { limit: 25, page: 1, sort: "rel" }.merge(options) _get( "/json/suggestConcepts", _event_query(concept, location, start_date, end_date, options) ) end
Private Instance Methods
_event_query(concept, location, start_date, end_date, options)
click to toggle source
@param {String} @param {String} @param {Date} @param {Date} @param {Hash} @return {Hash}
# File lib/event_registry_api/client/events.rb, line 41 def _event_query (concept, location, start_date, end_date, options) { "conceptUri" => concept, "locationUri" => location, "dateStart" => start_date, "dateEnd" => end_date, "eventsCount" => options[:limit], "eventsPage" => options[:page], "eventsSortBy" => options[:sort], "action" => "getEvents", "eventsConceptLang" => "eng", "eventsEventImageCount" => 0, "eventsIncludeEventSocialScore" => true, "resultType" => "events", "minArticlesInEvent" => "10", } end