Class: Svix::Statistics
- Inherits:
-
Object
- Object
- Svix::Statistics
- Defined in:
- lib/svix/api/statistics.rb
Instance Method Summary collapse
- #aggregate_app_stats(app_usage_stats_in, options = {}) ⇒ Object
- #aggregate_event_types ⇒ Object
-
#initialize(client) ⇒ Statistics
constructor
A new instance of Statistics.
Constructor Details
#initialize(client) ⇒ Statistics
Returns a new instance of Statistics.
8 9 10 |
# File 'lib/svix/api/statistics.rb', line 8 def initialize(client) @client = client end |
Instance Method Details
#aggregate_app_stats(app_usage_stats_in, options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/svix/api/statistics.rb', line 12 def aggregate_app_stats(app_usage_stats_in, = {}) = .transform_keys(&:to_s) res = @client.execute_request( "POST", "/api/v1/stats/usage/app", headers: { "idempotency-key" => ["idempotency-key"] }, body: app_usage_stats_in ) AppUsageStatsOut.deserialize(res) end |
#aggregate_event_types ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/svix/api/statistics.rb', line 25 def aggregate_event_types res = @client.execute_request( "PUT", "/api/v1/stats/usage/event-types" ) AggregateEventTypesOut.deserialize(res) end |