Class: Orb::Resources::Events::Volume

Inherits:
Object
  • Object
show all
Defined in:
lib/orb/resources/events/volume.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Volume

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Volume.

Parameters:



53
54
55
# File 'lib/orb/resources/events/volume.rb', line 53

def initialize(client:)
  @client = client
end

Instance Method Details

#list(timeframe_start: , cursor: nil, limit: nil, timeframe_end: nil, request_options: {}) ⇒ Orb::Models::Events::EventVolumes

Some parameter documentations has been truncated, see Models::Events::VolumeListParams for more details.

This endpoint returns the event volume for an account in a [paginated list format](/api-reference/pagination).

The event volume is aggregated by the hour and the [timestamp](/api-reference/event/ingest-events) field is used to determine which hour an event is associated with. Note, this means that late-arriving events increment the volume count for the hour window the timestamp is in, not the latest hour window.

Each item in the response contains the count of events aggregated by the hour where the start and end time are hour-aligned and in UTC. When a specific timestamp is passed in for either start or end time, the response includes the hours the timestamp falls in.

Parameters:

  • timeframe_start (Time)

    The start of the timeframe, inclusive, in which to return event volume. All date

  • cursor (String, nil)

    Cursor for pagination. This can be populated by the ‘next_cursor` value returned

  • limit (Integer)

    The number of items to fetch. Defaults to 20.

  • timeframe_end (Time)

    The end of the timeframe, exclusive, in which to return event volume. If not spe

  • request_options (Orb::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



39
40
41
42
43
44
45
46
47
48
# File 'lib/orb/resources/events/volume.rb', line 39

def list(params)
  parsed, options = Orb::Events::VolumeListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "events/volume",
    query: parsed,
    model: Orb::Events::EventVolumes,
    options: options
  )
end