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

#log(id) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Logs

-

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

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

def log(id)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = "/api/logs/#{id}"
  get(path)
end

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

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Logs

auth0.com/docs/api/v1#!#logs

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

9
10
11
12
13
14
15
16
17
18
19
# File 'lib/auth0/api/v1/logs.rb', line 9

def logs(options = {})
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  acceptable_params = %i(take from search_criteria page per_page sort fields exclude_fields)
  options.reject! do |key, value|
    next unless key.nil? || value.nil? || !acceptable_params.include?(key.to_sym)
    warn "#{key} is not in acceptable params list: #{acceptable_params}"
    true
  end
  path = "/api/logs?#{URI.encode_www_form(options)}"
  get(path)
end

#user_logs(user_id, page = 0, per_page = 50) ⇒ Object

Deprecated.
  • 4.14.0, please use Auth0::Api::V2::Logs

-

See Also:

  • https://auth0.com/docs/migrations/guides/management-api-v1-v2

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

def user_logs(user_id, page = 0, per_page = 50)
  warn "[DEPRECATION] Api::V1 is deprecated please use Api::V2"
  path = "/api/users/#{user_id}/logs?page=#{page}&per_page=#{per_page}"
  get(path)
end