Sha256: be42043c49e44fdd6a8d2a94af28b28ae800829d86a06db0c25745566983ef51

Contents?: true

Size: 1.87 KB

Versions: 46

Compression:

Stored size: 1.87 KB

Contents

module Access
  class OauthApplication

    def self.search(options = {})
      # Internal Admin only Call
      Access::Api.new.search_oauth_applications options
    end

    def self.find(application_id, options = {})
      # Internal Admin only Call
      Access::Api.new.find_oauth_application application_id, options
    end

    def self.search_tokens(application_id, options = {})
      # Internal Admin only Call
      # Returns Token Response
      Access::Api.new.search_oauth_application_tokens application_id, options
    end

    def self.find_token(application_id, token_id, options = {})
      # Internal Admin only Call
      # Returns Token Response
      Access::Api.new.find_oauth_application_token application_id, token_id, options
    end

    def self.create_token(application_id, options = {})
      # Internal Admin only Call
      Access::Api.new.create_oauth_application_token application_id, options
    end

    def self.create(options = {})
      # Internal Admin only Call
      Access::Api.new.create_oauth_application options
    end

    def self.update(application_id, options = {})
      # Internal Admin only Call
      Access::Api.new.update_oauth_application application_id, options
    end

    def self.delete(application_id, options = {})
      # Internal Admin only Call
      Access::Api.new.delete_oauth_application application_id, options
    end

    def self.process_batch(chunk)
      chunk.map { |application| new(application) }
    end

    def initialize(values)
      self.class.class_eval {attr_reader *values.keys }
      values.each do |attribute_name, attribute_value|
        self.instance_variable_set("@#{attribute_name}", attribute_value)
      end
      @links = Access::Link.new(@links) if @links
      @filter = Access::Filter.new(@filter) if @filter
    end

    def has_scope?(scope)

    end

    def oauth_application_key
      @id
    end

  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
access-2.0.50 lib/access/oauth_application.rb
access-2.0.49 lib/access/oauth_application.rb
access-2.0.48 lib/access/oauth_application.rb
access-2.0.47 lib/access/oauth_application.rb
access-2.0.46 lib/access/oauth_application.rb
access-2.0.44 lib/access/oauth_application.rb
access-2.0.43 lib/access/oauth_application.rb
access-2.0.42 lib/access/oauth_application.rb
access-2.0.41 lib/access/oauth_application.rb
access-2.0.40 lib/access/oauth_application.rb
access-2.0.39 lib/access/oauth_application.rb
access-2.0.38 lib/access/oauth_application.rb
access-2.0.37 lib/access/oauth_application.rb
access-2.0.36 lib/access/oauth_application.rb
access-2.0.34 lib/access/oauth_application.rb
access-2.0.33 lib/access/oauth_application.rb
access-2.0.32 lib/access/oauth_application.rb
access-2.0.31 lib/access/oauth_application.rb
access-2.0.30 lib/access/oauth_application.rb
access-2.0.29 lib/access/oauth_application.rb