Class: Brazify::Segment

Inherits:
Resource show all
Defined in:
lib/brazify/resources/segment.rb

Class Method Summary collapse

Methods inherited from Resource

list_methods

Class Method Details

.listObject



4
5
6
# File 'lib/brazify/resources/segment.rb', line 4

def list
  get(path: '/segments/list')
end

.retrieve(segment_id:) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/brazify/resources/segment.rb', line 8

def retrieve(segment_id:)
  get(
    path: '/segments/details',
    params: {
      segment_id: segment_id
    }
  )
end

.retrieve_analytics(segment_id:, length:, ending_at: nil) ⇒ Object



17
18
19
20
21
22
23
24
25
26
# File 'lib/brazify/resources/segment.rb', line 17

def retrieve_analytics(segment_id:, length:, ending_at: nil)
  get(
    path: '/segments/data_series',
    params: {
      segment_id: segment_id,
      length: length,
      ending_at: ending_at
    }
  )
end