Module: Auth0::Api::V1::Clients

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

Overview

Instance Method Summary collapse

Instance Method Details

#clientsObject Also known as: get_clients



7
8
9
10
# File 'lib/auth0/api/v1/clients.rb', line 7

def clients
  path = "/api/clients"
  get(path)
end

#create_client(name, callbacks = "") ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/auth0/api/v1/clients.rb', line 15

def create_client(name, callbacks="")
  path = "/api/clients"
  request_params = {
    name: name,
    callbacks: callbacks
  }
  post(path, request_params)
end

#patch_client(name, callbacks = "", client_id = @client_id) ⇒ Object

-



37
38
39
40
41
42
43
44
# File 'lib/auth0/api/v1/clients.rb', line 37

def patch_client(name, callbacks="", client_id=@client_id)
  path = "/api/clients/#{client_id}"
  request_params = {
    name: name,
    callbacks: callbacks
  }
  patch(path, request_params)
end

#update_client(name, callbacks = "", client_id = @client_id) ⇒ Object

Deprecated.

-



26
27
28
29
30
31
32
33
34
# File 'lib/auth0/api/v1/clients.rb', line 26

def update_client(name, callbacks="", client_id=@client_id)
  warn "This endpoint has been deprecated in favor of PATCH."
  path = "/api/clients/#{client_id}"
  request_params = {
    name: name,
    callbacks: callbacks
  }
  put(path, request_params)
end