Class: BaremetricsAPI::Endpoint::Annotations
- Inherits:
-
Object
- Object
- BaremetricsAPI::Endpoint::Annotations
- Defined in:
- lib/baremetrics_api/endpoint/annotations.rb
Constant Summary collapse
- PATH =
'annotations'.freeze
Instance Method Summary collapse
- #create_annotation(annotation_params:) ⇒ Object
- #delete_annotation(id:) ⇒ Object
-
#initialize(client) ⇒ Annotations
constructor
A new instance of Annotations.
- #list_annotations(page: nil) ⇒ Object
- #show_annotation(id:) ⇒ Object
Constructor Details
#initialize(client) ⇒ Annotations
Returns a new instance of Annotations.
6 7 8 |
# File 'lib/baremetrics_api/endpoint/annotations.rb', line 6 def initialize(client) @client = client end |
Instance Method Details
#create_annotation(annotation_params:) ⇒ Object
18 19 20 |
# File 'lib/baremetrics_api/endpoint/annotations.rb', line 18 def create_annotation(annotation_params:) JSON.parse(create_annotation_request(annotation_params).body).with_indifferent_access end |
#delete_annotation(id:) ⇒ Object
22 23 24 |
# File 'lib/baremetrics_api/endpoint/annotations.rb', line 22 def delete_annotation(id:) JSON.parse(delete_annotation_request(id).body).with_indifferent_access end |
#list_annotations(page: nil) ⇒ Object
10 11 12 |
# File 'lib/baremetrics_api/endpoint/annotations.rb', line 10 def list_annotations(page: nil) JSON.parse(list_annotations_request(page).body).with_indifferent_access end |
#show_annotation(id:) ⇒ Object
14 15 16 |
# File 'lib/baremetrics_api/endpoint/annotations.rb', line 14 def show_annotation(id:) JSON.parse(show_annotation_request(id).body).with_indifferent_access end |