Module: Auth0::Api::V1::Logs

Included in:
Auth0::Api::V1
Defined in:
lib/auth0/api/v1/logs.rb

Overview

Instance Method Summary (collapse)

Instance Method Details

- (Object) log(id)



28
29
30
31
# File 'lib/auth0/api/v1/logs.rb', line 28

def log(id)
  path = "/api/logs/#{id}"
  get(path)
end

- (Object) logs(options = {}) Also known as: search_logs



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/auth0/api/v1/logs.rb', line 11

def logs(options={})
  acceptable_params = %i(take from search_criteria page per_page sort fields exclude_fields)
  options.reject! do |key,value|
    if key.nil? ||\
       value.nil? ||\
       !acceptable_params.include?(key.to_sym)
      warn "#{key} is not in acceptable params list: #{acceptable_params}"
      true
    end
  end
  path= "/api/logs?"+URI.encode_www_form(options)
  get(path)
end

- (Object) user_logs(user_id, page = 0, per_page = 50)



34
35
36
37
# File 'lib/auth0/api/v1/logs.rb', line 34

def user_logs(user_id, page=0, per_page=50)
  path = "/api/users/#{user_id}/logs?page=#{page}&per_page=#{per_page}"
  get(path)
end