Module: Scooter::HttpDispatchers::Activity::V1

Included in:
Scooter::HttpDispatchers::Activity
Defined in:
lib/scooter/httpdispatchers/activity/v1/v1.rb

Overview

Methods here are generally representative of endpoints, and depending on the method, return either a Faraday response object or some sort of instance of the object created/modified.

Instance Method Summary collapse

Instance Method Details

#get_classifier_events(filters = {}) ⇒ Object

Gets events from classifier

Parameters:

  • filters (Hash) (defaults to: {})

    query strings to filter the activity events:

Options Hash (filters):

  • :subject_type (String)
    optional; required only when subject_id is provided
  • :subject_id (String)
    optional; comma-separated list of subject_ids
  • :object_type (String)
    optional; required only when object_id is provided
  • :object_id (String)
    optional; comma-separated list of object_ids
  • :offset (String)
    optional; skip n event commits
  • :limit (String)
    optional; return no more than n event commits; defaults to 1000

Returns:

  • (Object)

    The events queried



18
19
20
21
22
23
24
25
26
# File 'lib/scooter/httpdispatchers/activity/v1/v1.rb', line 18

def get_classifier_events(filters = {})
  set_activity_service_path
  @connection.get 'v1/events' do |request|
    request.params['service_id'] = 'classifier'
    filters.each { |param, value|
      request.params[param] = value
    }
  end
end

#get_rbac_events(filters = {}) ⇒ Object

Gets events from rbac

Parameters:

  • filters (Hash) (defaults to: {})

    query strings to filter the activity events:

Options Hash (filters):

  • :subject_type (String)
    optional; required only when subject_id is provided
  • :subject_id (String)
    optional; comma-separated list of subject_ids
  • :object_type (String)
    optional; required only when object_id is provided
  • :object_id (String)
    optional; comma-separated list of object_ids
  • :offset (String)
    optional; skip n event commits
  • :limit (String)
    optional; return no more than n event commits; defaults to 1000

Returns:

  • (Object)

    The events queried



38
39
40
41
42
43
44
45
46
# File 'lib/scooter/httpdispatchers/activity/v1/v1.rb', line 38

def get_rbac_events(filters = {})
  set_activity_service_path
  @connection.get 'v1/events' do |request|
    request.params['service_id'] = 'rbac'
    filters.each { |param, value|
      request.params[param] = value
    }
  end
end