0.0
No release in over a year
A Ruby wrapper for Mailbluster API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

mailbluster

Gem Version CI

Ruby client for the Mailbluster API.


  • Quick start
  • Usage
  • Demo script
  • API Documentation
  • Detailed mailbluster-ruby documentation
  • Support
  • License
  • Code of conduct
  • Contribution guide

Quick start

gem install mailbluster

or with bundler:

bundler add mailbluster

then configure the gem:

Mailbluster.configure do |config|
  config.api_key = 'your-api-key'
end

or with environment variables:

env MAILBLUSTER_API_KEY=your-api-key ruby app.rb

or directly on the Client instance:

mailbluster_client = Mailbluster::Client.new('your-api-key')

Usage

mailbluster_client = Mailbluster::Client.new
lead = mailbluster_client.leads.create(email: 'lead@example.org')
puts lead.inspect # => #<Mailbluster::Resource @resource_type=#<Mailbluster::ResourceType::Lead>, @raw_attributes={"id"=>262093545 ...}>

mailbluster_client.leads.read(lead.email) # => #<Mailbluster::Resource @resource_type=#<Mailbluster::ResourceType::Lead>, @raw_attributes={"id"=>262093545 ...}>

Sample Attributes to create Lead

create_lead_attributes = {
  "firstName" => "Richard",
  "lastName" => "Hendricks",
  "fields" => {
    "gender" => "Male",
    "address" => "Silicon Valley"
  },
  "email" => "richard@example.com",
  "ipAddress" => "162.213.1.246",
  "subscribed" => false,
  "doubleOptIn" => true,
  "meta" => {
    "company" => "Pied Piper",
    "role" => "CEO"
  },
  "tags" => [
    "iPhone User",
    "Startup"
  ],
  "overrideExisting" => true
}

Demo script

In the bin directory, there is a demo script that you can run to see how to use the gem and to create example leads in Mailbluster. You can run it like this:

env MAILBLUSTER_API_KEY=your-api-key ruby bin/demo

Mailbluster API Documentation

Official documentation for the Mailbluster API can be found at https://app.mailbluster.com/api-doc.

Detailed mailbluster-ruby documentation

Support

If you want to report a bug, or have ideas, feedback or questions about the gem, let me know via GitHub issues and I will do my best to provide a helpful answer. Happy hacking!

License

The gem is available as open source under the terms of the MIT License.

Code of conduct

Everyone interacting in this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

Contribution guide

Pull requests are welcome!