Module: Bugsnag::Api::Client::Trends
- Included in:
- Bugsnag::Api::Client
- Defined in:
- lib/bugsnag/api/client/trends.rb
Overview
Methods for the Pivots API
Instance Method Summary collapse
-
#trends_buckets(project_id, buckets_count, error_id = nil, options = {}) ⇒ Array<Sawyer::Resource>
List Trends for an Error in bucket form.
-
#trends_resolution(project_id, resolution, error_id = nil, options = {}) ⇒ Array<Sawyer::Resource>
List Trends for an Error in resolution form.
Instance Method Details
#trends_buckets(project_id, buckets_count, error_id = nil, options = {}) ⇒ Array<Sawyer::Resource>
List Trends for an Error in bucket form
14 15 16 17 18 19 20 21 22 |
# File 'lib/bugsnag/api/client/trends.rb', line 14 def trends_buckets(project_id, buckets_count, error_id=nil, = {}) defaults = {:query => {:buckets_count => buckets_count}} merged_opts = deep_merge(defaults, ) if !error_id.nil? get "projects/#{project_id}/errors/#{error_id}/trend", merged_opts else get "projects/#{project_id}/trend", merged_opts end end |
#trends_resolution(project_id, resolution, error_id = nil, options = {}) ⇒ Array<Sawyer::Resource>
List Trends for an Error in resolution form
29 30 31 32 33 34 35 36 37 |
# File 'lib/bugsnag/api/client/trends.rb', line 29 def trends_resolution(project_id, resolution, error_id=nil, = {}) defaults = {:query => {:resolution => resolution}} merged_opts = deep_merge(defaults, ) if !error_id.nil? get "projects/#{project_id}/errors/#{error_id}/trend", merged_opts else get "projects/#{project_id}/trend", merged_opts end end |