Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby wrapper for the MyEmma Remote Signup API

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 MIT_LICENSE
Octocat-spinner-32 README.textile
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 my_emma.gemspec
README.textile

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.

Something went wrong with that request. Please try again.