Module: Auth0::Api::V2::Clients

Included in:
Auth0::Api::V2
Defined in:
lib/auth0/api/v2/clients.rb

Overview

Instance Method Summary collapse

Instance Method Details

#client(client_id, options = {}) ⇒ Object



20
21
22
23
# File 'lib/auth0/api/v2/clients.rb', line 20

def client(client_id, options={})
  path = "/api/v2/clients/" + client_id.to_s
  get(path, options)
end

#clients(options = {}) ⇒ Object Also known as: get_clients



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

def clients(options={})
  get(path, options)
end

#create_client(name, options = {}) ⇒ Object



13
14
15
16
17
# File 'lib/auth0/api/v2/clients.rb', line 13

def create_client(name, options={})
  request_params = Hash[options.map{|(k,v)| [k.to_sym,v]}]
  request_params[:name] = name
  post(path, request_params)
end

#delete_client(client_id) ⇒ Object



26
27
28
29
# File 'lib/auth0/api/v2/clients.rb', line 26

def delete_client(client_id)
  path = "/api/v2/clients/" + client_id.to_s
  delete(path)
end

#patch_client(client_id, options) ⇒ Object



32
33
34
35
# File 'lib/auth0/api/v2/clients.rb', line 32

def patch_client(client_id, options)
  path = "/api/v2/clients/" + client_id.to_s
  patch(path, options)
end