Sha256: a8b70b3b15bea32b76bbc9b0e87b8b18b7d4487be2c6643d219e42ad9edd40cd

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

module Auth0
  module Api
    module V2
      #https://auth0.com/docs/apiv2#!/clients
      module Clients
        #https://auth0.com/docs/apiv2#!/clients/get_clients
        def clients(options={})
          get(path, options)
        end
        alias :get_clients :clients

        #https://auth0.com/docs/apiv2#!/clients/post_clients
        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

        #https://auth0.com/docs/apiv2#!/clients/get_clients_by_id
        def client(client_id, options={})
          path = "/api/v2/clients/" + client_id.to_s
          get(path, options)
        end

        #https://auth0.com/docs/apiv2#!/clients/delete_clients_by_id
        def delete_client(client_id)
          path = "/api/v2/clients/" + client_id.to_s
          delete(path)
        end

        #https://auth0.com/docs/apiv2#!/clients/patch_clients_by_id
        def patch_client(client_id, options)
          path = "/api/v2/clients/" + client_id.to_s
          patch(path, options)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auth0-ruby-0.10 lib/auth0/api/v2/clients.rb