2017 © Pedro Peláez
 

library smarkio-revisor-api-client

Accelerator to communicate with the Smarkio Feedback API

image

smarkio/smarkio-revisor-api-client

Accelerator to communicate with the Smarkio Feedback API

  • Monday, April 3, 2017
  • by developers@smark.io
  • Repository
  • 17 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

#Smarkio Revisor - API

An accelerator to communicate with © Smarkio Feedback API, (*1)

Installation and usage with Composer

Add the following to your composer.json file in order to fetch the latest stable version of the project:, (*2)

{
    "require": {
        "smarkio/smarkio-revisor-api-client": "*"
    }
}

Then, in order to use the accelerator on your own PHP file, add the following:, (*3)

require '[COMPOSER_VENDOR_PATH]/autoload.php';

Contents

  • src/Smarkio/Revisor - Code to interact with the Smarkio Feedback API.
  • examples/ - Some examples on how to use this accelerator.

Before you start

You need to obtain one API token to use the API. This token enables the API to recognize the Revisor trying to send requests., (*4)

Usage

Send Lead Feedback

$api_token = 'YOUR API TOKEN HERE';
$lead_id = '123456789';
$status = 'converted';

// create Feedback based on the leadId in LeadOffice
$feedback = Feedback::createWithLeadId($api_token, $lead_id, $status);

// set Lead's optional parameters
$feedback->setInstantAt(date('Y-m-d H:i:s'));
$feedback->setDescription('Additional information about what happened');

// add Lead's optional extra fields
$feedback->addExtraFields(array('field_1'=>'value_1','field_2'=>'value_2'));

// send the Feedback
$response = $feedback->send();

Send Lead Feedback without Lead ID

$api_token = 'YOUR API TOKEN HERE';
$external_id = '123456789';
$supplier_id = '1';
$status = 'converted';

// create Feedback with mandatory parameters
$feedback = Feedback::createWithSupplierExternalId($api_token, $supplier_id, $external_id, $status);

// send the Feedback
$response = $feedback->send();

The Versions

03/04 2017

dev-master

9999999-dev https://github.com/smarkio/smarkio-revisor-api-client

Accelerator to communicate with the Smarkio Feedback API

  Sources   Download

MIT

lead smarkio revisor

03/04 2017

1.1.0

1.1.0.0 https://github.com/smarkio/smarkio-revisor-api-client

Accelerator to communicate with the Smarkio Feedback API

  Sources   Download

MIT

lead smarkio revisor

03/10 2014

1.0.0

1.0.0.0 https://github.com/smarkio/smarkio-revisor

Accelerator to communicate with the Smark.io Feedback API

  Sources   Download

MIT

lead smarkio revisor