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.28 lib/access/oauth_application.rb
access-2.0.27 lib/access/oauth_application.rb
access-2.0.26 lib/access/oauth_application.rb
access-2.0.25 lib/access/oauth_application.rb
access-2.0.24 lib/access/oauth_application.rb
access-2.0.23 lib/access/oauth_application.rb
access-2.0.22 lib/access/oauth_application.rb
access-2.0.21 lib/access/oauth_application.rb
access-2.0.20 lib/access/oauth_application.rb
access-2.0.19 lib/access/oauth_application.rb
access-2.0.18 lib/access/oauth_application.rb
access-2.0.17 lib/access/oauth_application.rb
access-2.0.15 lib/access/oauth_application.rb
access-2.0.14 lib/access/oauth_application.rb
access-2.0.13 lib/access/oauth_application.rb
access-2.0.11 lib/access/oauth_application.rb
access-2.0.10 lib/access/oauth_application.rb
access-2.0.9 lib/access/oauth_application.rb
access-2.0.8 lib/access/oauth_application.rb
access-2.0.7 lib/access/oauth_application.rb