Exemplo n.º 1
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Linkorb\TicketBoxClient\Client;
use Linkorb\TicketBoxClient\Ticket;
// get the client
$client = new Client('http://tickets.dev/api/v1/', 'kishanio', '11121992');
// Create Anon Ticket
$ticket = new Ticket($client);
$ticket->get(1);
echo $ticket->getSubject();
// all the field null if not found.
$activities = $ticket->getActivity();
var_dump($activities);
Exemplo n.º 2
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Linkorb\TicketBoxClient\Client;
use Linkorb\TicketBoxClient\Ticket;
// get the client
$client = new Client('http://tickets.dev/api/v1/', 'kishanio', '11121992');
// Get ticket
$ticket = new Ticket($client);
$ticket->get(5);
try {
    $ticket->message('this is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another messagethis is some another message');
} catch (Exception $e) {
    echo $e->getMessage();
}
Exemplo n.º 3
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Linkorb\TicketBoxClient\Client;
use Linkorb\TicketBoxClient\Ticket;
// get the client
$client = new Client('http://tickets.dev/api/v1/', 'kishanio', '11121992');
// Get ticket
$ticket = new Ticket($client);
$ticket->get(4);
try {
    $ticket->transfer(2);
} catch (Exception $e) {
    echo $e->getMessage();
}