Sha256: 49d5b660b00241b505aaf39ad9bae6982b0d3ff4cf88172bd711d6a339c737b0

Contents?: true

Size: 1.35 KB

Versions: 11

Compression:

Stored size: 1.35 KB

Contents

module Auth0
  module Api
    module V1
      # {https://auth0.com/docs/api#applications}
      module Clients
        # {https://auth0.com/docs/api#!#get--api-clients}
        def clients
          path = '/api/clients'
          get(path)
        end

        alias get_clients clients

        # {https://auth0.com/docs/api#!#post--api-clients}
        def create_client(name, callbacks = '')
          path = '/api/clients'
          request_params = {
            name: name,
            callbacks: callbacks
          }
          post(path, request_params)
        end

        # @deprecated use {#patch_client}
        # {https://auth0.com/docs/api#!#put--api-clients--client-id-}
        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

        # {https://auth0.com/docs/api#!#patch--api-clients--client-id-}
        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
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
auth0-4.13.0 lib/auth0/api/v1/clients.rb
auth0-4.12.0 lib/auth0/api/v1/clients.rb
auth0-4.11.0 lib/auth0/api/v1/clients.rb
auth0-4.10.0 lib/auth0/api/v1/clients.rb
auth0-4.9.0 lib/auth0/api/v1/clients.rb
auth0-4.8.0 lib/auth0/api/v1/clients.rb
auth0-4.7.0 lib/auth0/api/v1/clients.rb
auth0-4.6.0 lib/auth0/api/v1/clients.rb
auth0-4.5.0 lib/auth0/api/v1/clients.rb
auth0-4.4.0 lib/auth0/api/v1/clients.rb
auth0-4.1.0 lib/auth0/api/v1/clients.rb