Skip to content

marekwalach/ipresso_api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iPresso REST API Client

Total Downloads Latest Stable Version

Documentation

Installation

Install the latest version with

$ composer require michalper/ipresso_api

Examples

Authentication

<?php

$ipresso = new iPresso();
$ipresso->setLogin('login');
$ipresso->setPassword('password');
$ipresso->setCustomerKey('customerKey');
$ipresso->setUrl('https://yourdomain.ipresso.pl');
$token = $ipresso->getToken();

Adding new contact

<?php

use \iPresso\Model\Contact;
use \iPresso\Service\Response;

$contact = new Contact();
$contact->setEmail('[email protected]');
$contact->setFirstName('FirstName');
$contact->setLastName('LastName');

/** @var Response $response */
$response = $ipresso->contact->add($contact);

Collect contact’s data with a given ID number

<?php

use \iPresso\Service\Response;

$idContact = 1;
/** @var Response $response */
$response = $ipresso->contact->get($idContact);

Adding activity to a contact

<?php

use \iPresso\Service\Response;
use \iPresso\Model\ContactActivity;

$idContact = 1;
$contactActivity = new ContactActivity();
$contactActivity->setKey('activityKey');
$contactActivity->setDate('2017-01-01 00:00:01');
$contactActivity->addParameter('parameterKey','parameterValue');

/** @var Response $response */
$response = $ipresso->contact->addActivity($idContact, $contactActivity);

About

Requirements

  • iPresso REST API Client works with PHP 5.3 or above.

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

About

Unofficial iPresso API Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%