izziaraffaele/twenga-php

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP client for Twenga reports API

v0.1.6 2016-11-13 12:54 UTC

This package is not auto-updated.

Last update: 2022-11-30 11:15:17 UTC


README

A very user-friendly PHP client for Twenga.

Requirements:

  • PHP must be 5.5 or higher.
  • Guzzle 6 as HTTP client.

Instalation

Use Composer.

Install Composer Globally (Linux / Unix / OSX):

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

Run this Composer command to install the latest stable version of the client, in the current folder:

composer require izziaraffaele/twenga-php

After installing, require Composer's autoloader and you're good to go:

<?php
require 'vendor/autoload.php';

Getting Started

use Twenga\Api;

// Initialize the API
$api = new Api([
    'username' => 'username',
    'password' => 'password'
]);

$response = $api->report([
    'start' => 'YYYY-MM-DD',
    'end' => 'YYYY-MM-DD'
]);

if($response->success())
{
    var_dump($response->result());
}

Docs

Please refer to the source code for now, while a proper documentation is made.