コード例 #1
0
ファイル: message.php プロジェクト: linkorb/ticketbox-client
<?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();
}
コード例 #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');
// Create Ticket with Logged in user
$ticket = new Ticket($client);
// padidng client
$ticket->setSubject('TicketBox Ticket Subject');
$ticket->setDescription('TicketBox Ticket Description');
try {
    $ticket->create();
} catch (Exception $e) {
    echo $e->getMessage();
}
コード例 #3
0
ファイル: get.php プロジェクト: linkorb/ticketbox-client
<?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);
コード例 #4
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->setSubject('TicketBox Ticket Subject');
$ticket->setDescription('TicketBox Ticket Description');
$ticket->setUser('TicketBox Ticket User');
$ticket->setEmail('TicketBox Ticket Email');
$ticket->setPhone('TicketBox Ticket Phone');
$ticket->setOrg('TicketBox Ticket Org');
try {
    $ticket->create();
} catch (Exception $e) {
    echo $e->getMessage();
}
コード例 #5
0
ファイル: status.php プロジェクト: linkorb/ticketbox-client
<?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->setPending();
    // $ticket->setClose();
    // $ticket->setSchedule();
} catch (Exception $e) {
    echo $e->getMessage();
}
コード例 #6
0
ファイル: transfer.php プロジェクト: linkorb/ticketbox-client
<?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();
}