Class: ContextIO::OAuthProviderCollection
- Inherits:
-
Object
- Object
- ContextIO::OAuthProviderCollection
- Includes:
- API::ResourceCollection
- Defined in:
- lib/contextio/oauth_provider_collection.rb
Overview
Represents a collection of OAuth providers for an account. You can use this to create a proider, fetch a specific one or iterate over them.
Instance Attribute Summary
Attributes included from API::ResourceCollection
#resource_url, #where_constraints
Instance Method Summary collapse
-
#create(type, provider_consumer_key, provider_consumer_secret) ⇒ OAuthProvider
Creates a new OAuth provider for your account.
Methods included from API::ResourceCollection
#[], #each, #empty?, #size, #where
Instance Method Details
#create(type, provider_consumer_key, provider_consumer_secret) ⇒ OAuthProvider
Creates a new OAuth provider for your account.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/contextio/oauth_provider_collection.rb', line 32 def create(type, provider_consumer_key, provider_consumer_secret) result_hash = api.request( :post, resource_url, type: type, provider_consumer_key: provider_consumer_key, provider_consumer_secret: provider_consumer_secret ) result_hash.delete('success') resource_class.new(api, result_hash) end |