Skip to content

pepotech/pepocampaigns-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

PepoCampaigns Ruby Client

Ruby client for PepoCampaigns REST API. For details about the API, documentation and examples please visit: https://know.pepocampaigns.com/categories/api/

Requirements

  • Ruby 2.1+ (Tested with rails 5.0)
  • openssl 1.0.1
  • TLS 1.2 protocol is recommended

Usage

Initialization

require "pepo_campaigns"

# api_key and api_secret to be passed while initialization
pepo_campaigns = PepoCampaigns.new('3gd68b470d1205bd57fd4dbfa1208ab1', 'e74c748409db3fae8add716fbeb315a2')

Example API Calls

Creating a new list

pepo_campaigns.create_list('test list2', 'My Pepo Campaigns Test List2', 'double')

Adding a contact to a List

pepo_campaigns.add_contact(419,'[email protected]', {'First Name' => 'Vpuui', 'Last Name' => 'Skbbx'})

Removing a contact from a list

pepo_campaigns.remove_contact(419,'[email protected]')

Changing User Status

pepo_campaigns.change_user_status('[email protected]', 'unsubscribe')

Send Transactional Email

pepo_campaigns.send_transactional_email("[email protected]", "welcome", {'a' => 1, 'b' => 2, 'c' => {'d' => 3, 'e' => 4}})

License

MIT License