my_emma
Post requests to MyEmma.com’s Remote Signup API.
Installation
sudo gem install hashrocket-my_emma
Usage
>> MyEmma.credentials = {
:emma_account_id => '9999',
:signup_post => '8888',
:username => 'user',
:password => 'pass'
}
>> response = MyEmma.signup("test@example.com")
=> #<MyEmma::Response:0x11ba840 @response="1", @code=1>
>> response.success?
=> true
>> response.failed?
=> false
>> response.added_member?
=> true
>> response = MyEmma.signup("test@example.com")
=> #<MyEmma::Response:0x11ba840 @response="2", @code=2>
>> response.updated_member?
=> true
>> MyEmma.signup("joe@example.com", {:emma_member_name_first => "Joe", :emma_member_name_last => "Piscopo"})
=> #<MyEmma::Response:0x11809b0 @response="1", @code=1>
# Assign member to group with an ID of 12345
>> MyEmma.signup("groupie@example.com", "group[12345]" => 1)
=> <MyEmma::Response:0x113a6f4 @response="1", @code=1>
Copyright
Copyright © 2009 Hashrocket. See MIT_LICENSE for details.