Class: Radar::Event
- Inherits:
-
API::Resource
- Object
- API::Resource
- Radar::Event
- Defined in:
- lib/radar/event.rb
Constant Summary collapse
- RESOURCE_NAME =
{ singular: 'event', plural: 'events' }.freeze
Class Method Summary collapse
Methods inherited from API::Resource
api_client, class_name, descendants, #initialize, resource_base_path, #to_h
Constructor Details
This class inherits a constructor from Radar::API::Resource
Class Method Details
.all(params: nil) ⇒ Object
5 6 7 8 9 |
# File 'lib/radar/event.rb', line 5 def self.all(params: nil) path = resource_base_path response = api_client.get(path, params: params) api_client.parsed_response(response, object_class: self) end |
.find(id:, params: nil) ⇒ Object
11 12 13 14 15 |
# File 'lib/radar/event.rb', line 11 def self.find(id:, params: nil) path = [resource_base_path, id].join('/') response = api_client.get(path) api_client.parsed_response(response, object_class: self) end |