Sha256: 3f41bcc32f3b011c2dbc317371b2f3283ed66ed6764d5f35a1a4ec70093225e9

Contents?: true

Size: 1.11 KB

Versions: 18

Compression:

Stored size: 1.11 KB

Contents

require 'contextio/api/resource'

class ContextIO
  # Represents a single OAuth provider for an account. You can use this to
  # inspect or delete the provider. Most of the attributes are lazily loaded,
  # meaning that the API won't get hit until you ask for an attribute the object
  # doesn't already have (presumably from a previous API call).
  class OAuthProvider
    include API::Resource

    # @!attribute [r] provider_consumer_key
    #   @return [String] The consumer key associated with this provider. Will
    #     fetch from the API if necessary.
    # @!attribute [r] provider_consumer_secret
    #   @return [String] The consumer secret associated with this provider. Will
    #     fetch from the API if necessary.
    # @!attribute [r] type
    #   @return [String] The consumer key associated with this provider. Will
    #     fetch from the API if necessary.
    lazy_attributes :provider_consumer_key, :provider_consumer_secret, :type

    self.primary_key = :provider_consumer_key
    self.association_name = :oauth_provider

    def delete
      api.request(:delete, resource_url)['success']
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
contextio-2.0.0 lib/contextio/oauth_provider.rb
contextio-1.8.1 lib/contextio/oauth_provider.rb
contextio-1.8.0 lib/contextio/oauth_provider.rb
contextio-1.7.2 lib/contextio/oauth_provider.rb
contextio-1.7.1 lib/contextio/oauth_provider.rb
contextio-1.7.0 lib/contextio/oauth_provider.rb
contextio-1.6.0 lib/contextio/oauth_provider.rb
contextio-1.5.0 lib/contextio/oauth_provider.rb
contextio-1.4.0 lib/contextio/oauth_provider.rb
contextio-1.3.0 lib/contextio/oauth_provider.rb
contextio-1.2.4 lib/contextio/oauth_provider.rb
contextio-1.2.3 lib/contextio/oauth_provider.rb
contextio-1.2.2 lib/contextio/oauth_provider.rb
contextio-1.2.1 lib/contextio/oauth_provider.rb
contextio-1.2.0 lib/contextio/oauth_provider.rb
contextio-1.1.0 lib/contextio/oauth_provider.rb
contextio-1.0.1 lib/contextio/oauth_provider.rb
contextio-1.0.0 lib/contextio/oauth_provider.rb