2017 © Pedro PelĂĄez
 

library trak-io-api-client

PHP Trak.io Api Client built on Guzzle

image

cossou/trak-io-api-client

PHP Trak.io Api Client built on Guzzle

  • Tuesday, February 17, 2015
  • by cossou
  • Repository
  • 5 Watchers
  • 21 Stars
  • 3,970 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Trak.io Api Client

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Installation

Install via Composer:, (*2)

{
    "require": {
        "cossou/trak-io-api-client": "1.0.*"
    }
}

Methods available

  • identify
  • alias
  • track
  • annotate
  • distinct_id
  • channel

Documentation: http://docs.trak.io/, (*3)

Examples

Quick Identify example:, (*4)


require_once 'vendor/autoload.php'; use Cossou\Trakio; $trakio = Trakio::init('YOUR-API-TOKEN'); // or // $trakio = Trakio::init('YOUR-API-TOKEN', array('distinct_id' => 123)); try { $response = $trakio->identify(array('distinct_id' => 123, 'properties' => array('name' => 'Hélder Duarte'))); var_dump($response); } catch(Exception $e) { echo $e->getMessage(); }

Laravel

Add to your app/config/app.php file and scroll down to your providers and add, (*5)

'providers' => array(
    ...
    'Cossou\TrakioServiceProvider',
)

And the alias:, (*6)

'aliases' => array(
    ...
    'Trakio'          => 'Cossou\Facades\Trakio',

And finally you run php artisan config:publish cossou/trak-io-api-client and fill in your API key., (*7)

And that's it!, (*8)

Quick Laravel Example

Route::get('/', function()
{
    $trak = new Trakio;

    try {
        $response = $trak::identify(array('distinct_id' => 123, 'properties' => array('name' => 'Hélder Duarte')));
        dd($response);
    } catch(Exception $e) {
        dd($e->getMessage());
    }   
}

License

MIT License, (*9)

The Versions

17/02 2015

dev-master

9999999-dev https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io

17/02 2015

v1.1.0

1.1.0.0 https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io

25/03 2014

v1.0.1

1.0.1.0 https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io

05/03 2014

v1.0.0

1.0.0.0 https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io

05/03 2014

1.0.0

1.0.0.0 https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io

05/03 2014

dev-development

dev-development https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io

05/03 2014

0.0.2

0.0.2.0 https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io

27/02 2014

0.0.1

0.0.1.0 https://github.com/cossou/trak-io-api

PHP Trak.io Api Client built on Guzzle

  Sources   Download

MIT

The Requires

 

by Hélder Duarte

api client guzzle trak trak.io