Apr 23, 2010

ChimpBot: The API Wrapper for Android

Time to spread the monkey love to our Android developer friends!  We recently announced ChimpKit for iPhone developers and are now happy to announce the availability of ChimpBot for Android!

What’s ChimpBot?

Sample Signup Dialog

Sample Signup Dialog

ChimpBot is a Java wrapper for the MailChimp API specifically built for use in Android applications.  The source for ChimpBot is available on GitHub and eagerly awaiting feedback and contributions.

All of the API functions are available in the wrapper and split up by ‘category’ in a one-to-one mapping with the API documentation.  The corresponding classes are:

* CampaignMethods – all API functions available for managing campaigns, including scheduling, sending, sharing and template management.
* ListMethods – all API functions available for managing lists, including list fields, interest groups and subscription management.
* HelperMethods – all API helper functions are available, including useful tools like stripping CSS from HTML.
* SecurityMethods – the security API functions are covered, these currently revolve around API key management.

Under the helmet, ChimpBot uses XML-RPC to communicate with the MailChimp API.  All function calls return standard Java objects with data as member variables (no getters/setters to keep the object skinny!).

How do you use it?

To use ChimpBot, you can either:
* Download the jar file from GitHub and import it into your project.
* Pull down the source projects from GitHub and point your Android project to them accordingly.

Included in the GitHub distribution is a sample project you can use to get up and running really quickly.  The sample project includes a Dialog with a EditText element for the user to enter their email address and Subscribe and Cancel buttons.  The Subscribe button handler calls out to MailChimp through the API and handles the subscription.  All you need to do is copy the Dialog layout and class file, tweak the UI as you wish, and drop in your API key.

Join the Developer Program

We’re offering Android developers the same deal we offered to iPhone developers: six months of completely free service, no matter how large your mailing list isSignup for the developer program.