Module: RIQ
- Defined in:
- lib/riq.rb,
lib/riq/list.rb,
lib/riq/user.rb,
lib/riq/error.rb,
lib/riq/event.rb,
lib/riq/client.rb,
lib/riq/account.rb,
lib/riq/contact.rb,
lib/riq/riq_obj.rb,
lib/riq/list_item.rb,
lib/riq/batch_manager.rb,
lib/riq/list_item_manager.rb,
lib/riq/account_properties.rb
Overview
The namespace from which all magic springs
Defined Under Namespace
Classes: Account, AccountProperties, BatchManager, Client, Contact, Event, HTTPError, List, ListItem, ListItemManager, NotFoundError, NotImplementedError, RIQError, RIQObject, User
Class Method Summary collapse
-
.account(id = nil) ⇒ Account
Convenience method to create new Accounts.
- .account_props ⇒ Object
-
.accounts(opts = {}) ⇒ BatchManager
Returns an iterator for all accounts.
-
.client ⇒ Client
Always use RIQ.client to retrieve the client object.
-
.contact(id = nil) ⇒ Contact
Convenience method to create new Contacts.
-
.contacts(opts = {}) ⇒ BatchManager
Returns an iterator for all contacts.
-
.event(obj = nil) ⇒ Event
Convenience method to create new Events.
-
.init(key = nil, secret = nil) ⇒ RIQ
The module, in case you want it.
-
.list(id = nil) ⇒ List
Convenience method to create new Lists.
-
.lists(opts = {}) ⇒ BatchManager
Returns an iterator for all lists.
-
.user(id = nil) ⇒ User
Convenience method to create new Users.
Class Method Details
.account(id = nil) ⇒ Account
Convenience method to create new Accounts
78 79 80 |
# File 'lib/riq/account.rb', line 78 def account(id = nil) Account.new(id) end |
.account_props ⇒ Object
31 32 33 |
# File 'lib/riq/account_properties.rb', line 31 def account_props AccountProperties.new end |
.accounts(opts = {}) ⇒ BatchManager
Returns an iterator for all accounts
129 130 131 |
# File 'lib/riq/batch_manager.rb', line 129 def accounts(opts = {}) BatchManager.new(RIQ::Account, opts) end |
.client ⇒ Client
Always use RIQ.client to retrieve the client object.
126 127 128 129 |
# File 'lib/riq/client.rb', line 126 def client raise RIQError, 'Client not initialized' unless defined?(@@client) @@client end |
.contact(id = nil) ⇒ Contact
Convenience method to create new Contacts
195 196 197 |
# File 'lib/riq/contact.rb', line 195 def contact(id = nil) Contact.new(id) end |
.contacts(opts = {}) ⇒ BatchManager
Returns an iterator for all contacts
124 125 126 |
# File 'lib/riq/batch_manager.rb', line 124 def contacts(opts = {}) BatchManager.new(RIQ::Contact, opts) end |
.event(obj = nil) ⇒ Event
Convenience method to create new Events
69 70 71 |
# File 'lib/riq/event.rb', line 69 def event(obj = nil) Event.new(obj) end |
.init(key = nil, secret = nil) ⇒ RIQ
Returns The module, in case you want it.
116 117 118 119 120 121 122 |
# File 'lib/riq/client.rb', line 116 def init(key = nil, secret = nil) key ||= ENV['RIQ_TEST_API_KEY'] secret ||= ENV['RIQ_TEST_API_SECRET'] @@client = Client.new(key, secret) self end |
.list(id = nil) ⇒ List
Convenience method to create new Lists
85 86 87 |
# File 'lib/riq/list.rb', line 85 def list(id = nil) List.new(id) end |
.lists(opts = {}) ⇒ BatchManager
Returns an iterator for all lists
119 120 121 |
# File 'lib/riq/batch_manager.rb', line 119 def lists(opts = {}) BatchManager.new(RIQ::List, opts) end |