An implementation of the Zenbox integration API for Ruby. It's super simple and lets your sync your custom models with your gmail interface in minutes
For help with using Zenbox and this notifier email us.
Visit zenboxapp.com, click on "Install Zenbox Extension", and follow the instructions.
Add the zenbox gem to your Gemfile. In Gemfile:
Then from your project's RAILS_ROOT, and in your development environment, run:
bundle install rails generate zenbox --api-key your_key_here
The generator creates a file under
config/initializers/zenbox.rb configuring Zenbox with your API key. This file should be checked into your version control system so that it is deployed to your staging and production environments.
Any ActiveRecord model that responds to
include ::ModelHelper zenbox_model methods
where fields is just a list of methods your model responds to that you want synced with your backend, for example
zenbox_model :first_name, :last_name, :paying_customer?, :current_plan, :widgets_bought, :created_at
That's it! If you have additional models, that will also work fine, all the data will be merged, with the latest values replacing previous ones.
You can sync all your data in one-go with the
zenbox:sync rake task:
After adding the
zenbox gem to your Gemfile, you can simple use:
Zenbox.post(email, profile_data), where
profile_data is a hash. That's it!
You can also simply post to the endpoint using any http library from any language your prefer. Here's and example:
curl -X POST 'http://zenboxapp.com/customers?api_key=<your_api_key&[email protected]&title=Support People&widgets_consumed=4000'
Now go check out your email from [email protected]. If you've installed the Zenbox extension, you should see your custom fields rendered alongside!
The Zenbox gem was forked from Airbrake, which is a totally amazing company run by people you should support.
Zenbox is Copyright © 2008-2012 Zenbox. It is free software, and may be redistributed under the terms specified in the MIT-LICENSE file.