Class: ContextIO
- Inherits:
-
Object
- Object
- ContextIO
- Defined in:
- lib/contextio.rb,
lib/contextio/api.rb,
lib/contextio/file.rb,
lib/contextio/folder.rb,
lib/contextio/source.rb,
lib/contextio/thread.rb,
lib/contextio/account.rb,
lib/contextio/contact.rb,
lib/contextio/message.rb,
lib/contextio/version.rb,
lib/contextio/webhook.rb,
lib/contextio/body_part.rb,
lib/contextio/api/resource.rb,
lib/contextio/connect_token.rb,
lib/contextio/email_address.rb,
lib/contextio/email_settings.rb,
lib/contextio/oauth_provider.rb,
lib/contextio/api/url_builder.rb,
lib/contextio/file_collection.rb,
lib/contextio/folder_sync_data.rb,
lib/contextio/source_sync_data.rb,
lib/contextio/account_sync_data.rb,
lib/contextio/folder_collection.rb,
lib/contextio/source_collection.rb,
lib/contextio/thread_collection.rb,
lib/contextio/account_collection.rb,
lib/contextio/contact_collection.rb,
lib/contextio/message_collection.rb,
lib/contextio/webhook_collection.rb,
lib/contextio/body_part_collection.rb,
lib/contextio/api/association_helpers.rb,
lib/contextio/api/resource_collection.rb,
lib/contextio/connect_token_collection.rb,
lib/contextio/email_address_collection.rb,
lib/contextio/oauth_provider_collection.rb
Overview
Provides an object-oriented interface for the Context.IO API.
To use it, you have to sign up for an account.
Once you have an account, you can create a new ContextIO
object and interact
with the API using the methods on that object as a starting point.
Defined Under Namespace
Classes: API, Account, AccountCollection, AccountSyncData, BodyPart, BodyPartCollection, ConnectToken, ConnectTokenCollection, Contact, ContactCollection, EmailAddress, EmailAddressCollection, EmailSettings, File, FileCollection, Folder, FolderCollection, FolderSyncData, Message, MessageCollection, OAuthProvider, OAuthProviderCollection, Source, SourceCollection, SourceSyncData, Thread, ThreadCollection, Webhook, WebhookCollection
Class Method Summary collapse
-
.version ⇒ String
The gem version.
Instance Method Summary collapse
-
#accounts ⇒ AccountCollection
Your entry point for dealing with accounts.
-
#connect_tokens ⇒ ConnectTokenCollection
Your entry point for dealing with connect tokens.
-
#email_settings_for(email_address, source_type = 'IMAP') ⇒ EmailSettings
Discover the IMAP settings for an email account.
-
#initialize(key, secret, opts = {}) ⇒ ContextIO
constructor
Creates a new
ContextIO
instance and makes a new handle for the API. -
#oauth_providers ⇒ OAuthProviderCollection
Your entry point for dealing with oauth providers.
Constructor Details
#initialize(key, secret, opts = {}) ⇒ ContextIO
Creates a new ContextIO
instance and makes a new handle for the API.
This is your entry point to your Context.IO account. For a web app, you
probably want to instantiate this in some kind of initializer and keep it
around for the life of the process.
21 22 23 |
# File 'lib/contextio.rb', line 21 def initialize(key, secret, opts={}) @api = API.new(key, secret, opts) end |
Class Method Details
.version ⇒ String
The gem version.
8 9 10 |
# File 'lib/contextio/version.rb', line 8 def self.version VERSION end |
Instance Method Details
#accounts ⇒ AccountCollection
Your entry point for dealing with accounts.
45 46 47 |
# File 'lib/contextio.rb', line 45 def accounts AccountCollection.new(api) end |
#connect_tokens ⇒ ConnectTokenCollection
Your entry point for dealing with connect tokens.
37 38 39 |
# File 'lib/contextio.rb', line 37 def connect_tokens ConnectTokenCollection.new(api) end |
#email_settings_for(email_address, source_type = 'IMAP') ⇒ EmailSettings
Discover the IMAP settings for an email account.
57 58 59 |
# File 'lib/contextio.rb', line 57 def email_settings_for(email_address, source_type = 'IMAP') EmailSettings.new(api, email_address, source_type) end |
#oauth_providers ⇒ OAuthProviderCollection
Your entry point for dealing with oauth providers.
29 30 31 |
# File 'lib/contextio.rb', line 29 def oauth_providers OAuthProviderCollection.new(api) end |