Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/varyonic/pocus
Unofficial Ruby API client for iContact API (f.k.a. Vocus), inspired by Active Resource.
https://github.com/varyonic/pocus
api-client api-wrapper icontact-api ruby-gem
Last synced: 3 months ago
JSON representation
Unofficial Ruby API client for iContact API (f.k.a. Vocus), inspired by Active Resource.
- Host: GitHub
- URL: https://github.com/varyonic/pocus
- Owner: varyonic
- License: mit
- Created: 2016-05-26T21:56:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-07-03T18:54:14.000Z (over 4 years ago)
- Last Synced: 2024-10-10T03:34:06.681Z (3 months ago)
- Topics: api-client, api-wrapper, icontact-api, ruby-gem
- Language: Ruby
- Homepage:
- Size: 90.8 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Pocus
[![Gem Version](https://badge.fury.io/rb/pocus.svg)](http://badge.fury.io/rb/pocus)
[![Code Climate GPA](https://codeclimate.com/github/varyonic/pocus.svg)](https://codeclimate.com/github/varyonic/pocus)
[![Travis CI Status](https://secure.travis-ci.org/varyonic/pocus.svg)](https://travis-ci.org/varyonic/pocus)Unofficial Ruby API client for [iContact API](https://www.icontact.com/developerportal) (f.k.a. Vocus), inspired by Active Resource.
## Installation
Add to your application's Gemfile:
```ruby
gem 'pocus'
```And then execute:
$ bundle
## Requirements
iContact account, AppID and credentials, see the [iContact API Getting Started Guide](https://www.icontact.com/developerportal/documentation/start-building).
## Usage
Configure a connection and connect to the account:
```ruby
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:
```ruby
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
[email protected]
POCUS_PASSWORD=...
POCUS_TEST_ACCOUNT=99...99
POCUS_TEST_CLIENT_FOLDER=9...9
```
To test, run:bundle exec rake
## Contributions
Read [CONTRIBUTING](CONTRIBUTING.md) for details.
## History
Read the [CHANGELOG](CHANGELOG.md) for details.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Read the [LICENSE](LICENSE.md) for details.
Copyright (c) 2016-2019 [Varyonic](https://www.varyonic.com).