Project

mixmax

0.0
No release in over 3 years
Low commit activity in last 3 years
A ruby wrapper around MixMax's API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0

Runtime

~> 0.16.4
 Project Readme

Installation

Add this line to your application's Gemfile:

gem 'mixmax'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mixmax

Usage

First you need to initialize a new instance of Mixmax and pass in your API key

mixmax = Mixmax.new 'API_KEY'

If you're using rails, then you probably want to put it in your initializers:

config/initializers/mixmax.rb

MixmaxApi = Mixmax.new Rails.applications.credentials.mixmax_secret_key

Now you can do stuff like:

mixmax.sequences
# => [{"_id"=>"5ca6452dbf0cjs0jdf35800d7ed", "userId"=>"5ca50420262cdj2ie9361d39", "createdAt"=>"2019-04-04T17:55:57.201Z", "variables"=>["Email"], "linkTrackingEnabled"=>false, "fileTrackingEnabled"=>false, "notificationsEnabled"=>false, "name"=>"Mickey Mouse", "timezone"=>"America/Mexico_City", "stages"=>["5ca6452d9353js03kgfh20e5b8c2", "5ca64560cfj30dnwl5eef0ffa"], "bcc"=>nil, "cc"=>nil, "teamIds"=>nil}]
mixmax.sequence_recipients 'SEQUENCE_ID'

recipients = '{
        "recipients": [{
              "email": "hello@mixmax.com",
              "variables": {
                  "name": "Hugo Brockman",
                  "email": "hello@mixmax.com"
              }
          },
          {
              "email": "careers@mixmax.com",
              "variables": {
                  "name": "Mixmax hello",
                  "email": "careers@mixmax.com"
              }
          }],
          "scheduledAt": 1490300970312
      }'

mixmax.add_to_sequence('SEQUENCE_ID', recipients)

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mickeytgl/mixmax.

License

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