Class: ThisData::Event
- Inherits:
-
Object
- Object
- ThisData::Event
- Defined in:
- lib/this_data/event.rb
Class Method Summary collapse
-
.all(options = {}) ⇒ Object
Fetch an array of Events from the ThisData API Available options can be found at help.thisdata.com/docs/v1getevents.
Class Method Details
.all(options = {}) ⇒ Object
Fetch an array of Events from the ThisData API Available options can be found at
http://help.thisdata.com/docs/v1getevents
Returns: Array of OpenStruct Event objects
11 12 13 14 15 16 17 18 |
# File 'lib/this_data/event.rb', line 11 def self.all(={}) response = ThisData::Client.new.get(ThisData::EVENTS_ENDPOINT, query: ) # Use NestedStruct to turn this Array of deep Hashes into an array of # OpenStructs response.parsed_response["results"].collect do |event_hash| NestedStruct.new(event_hash) end end |