Pocus
¶ ↑
Unofficial Ruby API client for iContact API (f.k.a. Vocus), inspired by Active Resource.
Installation¶ ↑
Add to your application's Gemfile:
gem 'pocus'
And then execute:
$ bundle
Requirements¶ ↑
iContact account, AppID and credentials, see the iContact API Getting Started Guide.
Usage¶ ↑
Configure a connection and connect to the account:
credentials = { host: 'app.icontact.com', app_id: a, username: u, password: p } session = Pocus::Session.new(credentials) session.logger = Rails.logger account = Pocus::Account.new(session: session, account_id: account_id)
Navigate and update entities:
folder = acount.clientfolders.find(folder_id) folder.contacts.create(contacts_data)
See the specs for sample code.
Tests¶ ↑
To run the tests you will need your own iContact account with a test folder (name: 'My First List'). Set the following environment variables:
POCUS_APP_ID=0b34...b478c POCUS_USERNAME=vocus_api_sandbox@....com POCUS_PASSWORD=... POCUS_TEST_ACCOUNT=99...99 POCUS_TEST_CLIENT_FOLDER=9...9
To test, run:
bundle exec rake
Contributions¶ ↑
Read CONTRIBUTING for details.
History¶ ↑
Read the CHANGELOG for details.
License¶ ↑
The gem is available as open source under the terms of the MIT License.
Read the LICENSE for details.
Copyright © 2016-2019 Varyonic.