Git Product home page Git Product logo

salesmanago-api's Introduction

SalesManago API Client

Implementation of SalesManago API version 1.45. For more details about the API go to SalesManago site.

Installation

Install the package through composer.
For the latest stable version use:

php composer.phar require pixers/salesmanago-api:1.1.1

For the latest version use:

php composer.phar require pixers/salesmanago-api:dev-master

Usage

API Client is divided into several sub-services, responsible for particular resources (e.g. Contacts, Events):

  • ContactService
    • ContactService::create($owner, $data)
    • ContactService::update($owner, $email, $data)
    • ContactService::upsert($owner, $email, $data)
    • ContactService::delete($owner, $email, $data)
    • ContactService::has($owner, $email)
    • ContactService::useCoupon($email, $coupon)
    • ContactService::listByEmails($owner, $data)
    • ContactService::listByIds($owner, $data)
    • ContactService::listRecentlyModified($owner, $data)
    • ContactService::listRecentActivity($data)
  • CouponService
    • CouponService::create($owner, $email, $data)
  • EmailService
    • EmailService::create($data)
  • EventService
    • EventService::create($owner, $email, $data)
    • EventService::update($owner, $eventId, $data)
    • EventService::delete($owner, $eventId)
  • MailingListService
    • MailingListService::add($email)
    • MailingListService::remove($email)
  • PhoneListService
    • PhoneListService::add($email)
    • PhoneListService::remove($email)
  • RuleService
    • RuleService::create($owner, $data)
  • SystemService
    • SystemService::registerAccount($data)
    • SystemService::authorise($userName, $password)
  • TagService
    • TagService::getAll($owner, $data)
    • TagService::modify($owner, $email, $data)
  • TaskService
    • TaskService::create($data)
    • TaskService::update($taskId, $data)
    • TaskService::delete($taskId)

Basic usage

<?php

use Pixers\SalesManagoAPI\Client;
use Pixers\SalesManagoAPI\SalesManago;

// First - initialize configured client
// endpoint - e.g. https://app3.salesmanago.pl/api/
$client = new Client($clientId, $endpoint, $apiSecret, $apiKey);

// Then - initialize SalesManago Services Locator
$salesManago = new SalesManago($client);

// Now you can use specific services
$contactResponse = $salesManago->getContactService()->delete($owner, $email, $data);

$eventResponse = $salesManago->getEventService()->delete($owner, $eventId);

Tests

Create phpunit configuration in phpunit.xml file, based on template from phpunit.xml.dist. After that you can run tests with:

phpunit -c phpunit.xml

Authors

License

Copyright 2016 PIXERS Ltd - www.pixersize.com

Licensed under the BSD 3-Clause

salesmanago-api's People

Contributors

snapshotpl avatar orfin avatar ikselll avatar maciejkrol avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.