Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/newapplesho/pardot-smalltalk

Pardot API for Pharo Smalltalk
https://github.com/newapplesho/pardot-smalltalk

pardot pharo smalltalk

Last synced: about 2 months ago
JSON representation

Pardot API for Pharo Smalltalk

Awesome Lists containing this project

README

        

# pardot-smalltalk [![Build Status](https://travis-ci.org/newapplesho/pardot-smalltalk.svg?branch=master)](https://travis-ci.org/newapplesho/pardot-smalltalk)

[Pardot API](http://developer.pardot.com/) for Pharo Smalltalk.

# Supported Smalltalk Versions

Pharo Smalltalk 5.0, 6.0

# Installation

```smalltalk
Metacello new
baseline: 'Pardot';
repository: 'github://newapplesho/pardot-smalltalk:v0.1.2/pharo-repository';
load.
```

# Usage

## Setup
[official documentation](http://developer.pardot.com/#authentication)
> 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.

```smalltalk
PardotSettings initialize.
PardotSettings default
email: '';
password: '';
userKey: ''.
```

## Authentication

```smalltalk
"print it. 32-character hexadecimal API key will be returned".
PardotLogin new authenticate.
```

## Prospects

### Upserting Prospects

```smalltalk
PardotProspects new upsertEmail: ''.
```

## Visitors

### Assigning and Reassigning Visitors

```smalltalk
PardotVisitor new assignVisitorId: '' byProspectId: ''.
```

## Error handling

```smalltalk
[ PardotProspects new readEmail: '' ]
on: PardotException do:[:ex | ex inspect ].
```