Skip to content

TheDeadCode/ontraport-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby API client for ONTRAPORT

Gem Version GitHub Documentation License

Overview

This Gem implements ONTRAPORT's JSON REST API - that's a lot of capitals... but it's how they stylize their name :)

So far, all the objects API methods are supported. Forthcoming releases will add support for the other APIs.

Usage

Ontraport.get_object :contact, 12345
#=> #<Ontraport::Response @data=...>
Ontraport.save_or_update :contact, { email: '[email protected]', firstname: 'Foo' }
#=> #<Ontraport::Response @data=...>
Ontraport.tag_objects :contact, { add_list: '11111,22222', ids: '33333,44444' }
#=> #<Ontraport::Response @data=...>
Ontraport.untag_objects :contact, { remove_list: '11111,22222', ids: '33333,44444' }
#=> #<Ontraport::Response @data=...>
Ontraport.sequence_objects :contact, { add_list: '11111,22222', ids: '33333,44444' }
#=> #<Ontraport::Response @data=...>
Ontraport.unsequence_objects :contact, { remove_list: '11111,22222', ids: '33333,44444' }
#=> #<Ontraport::Response @data=...>

See documentation for more details/examples.

Installation

Bundler

Add the Ontraport gem to your Gemfile:

gem 'ontraport', '~> 0.1'

Manual

Install the Gem from your terminal -

gem install ontraport

Configuration

In Rails, use an initializer to configure -

# config/initializers/ontraport.rb
require 'ontraport'

Ontraport.configure do |config|
  config.api_id = 'foo'
  config.api_key = 'bar'
end

Contact

If you have a suggestion or a bug report, please file an issue.

License

The project uses the MIT License. See LICENSE.md for details.

About

Simple Ruby API client for ONTRAPORT

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%