Pardot API for Pharo Smalltalk.
Pharo Smalltalk 5.0, 6.0
Metacello new
baseline: 'Pardot';
repository: 'github://newapplesho/pardot-smalltalk:v0.1.2/pharo-repository';
load.
Obtain the email, password, and user_key (available in Pardot under {your email address} > Settings in the API User Key row) for the Pardot user account that will be submitting API requests.
PardotSettings initialize.
PardotSettings default
email: '<email>';
password: '<password>';
userKey: '<user_key>'.
"print it. 32-character hexadecimal API key will be returned".
PardotLogin new authenticate.
PardotProspects new upsertEmail: '<email>'.
PardotVisitor new assignVisitorId: '<visitor_id>' byProspectId: '<prospect_id>'.
[ PardotProspects new readEmail: '<e-mail>' ]
on: PardotException do:[:ex | ex inspect ].