2017 © Pedro Peláez
 

library ticketbox-client

TicketBox Client for TicketBox Application

image

linkorb/ticketbox-client

TicketBox Client for TicketBox Application

  • Tuesday, November 24, 2015
  • by joostfaassen
  • Repository
  • 7 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

TicketBox Client

Create tickets for TicketBox and view activities from your application, (*1)

Installation

composer require linkorb/ticketbox-client

Example

Create Client, (*2)

require_once __DIR__ . '/../vendor/autoload.php'; 

use Linkorb\TicketBoxClient\Client as Client;
use Linkorb\TicketBoxClient\Ticket as Ticket;

// get the client
$client = new Client(
    'http://tickets.dev/api/v1/',
    <username>,
    <password>
);

Create Ticket by logged in User, (*3)

// Create Ticket with Logged in user
$ticket = new Ticket( $client ); // padidng client
$ticket->setSubject(<ticket subject>);
$ticket->setDescription(<ticket descripton>);

try {
    $ticket->create(); 
} catch( Exception $e ) {
    echo $e->getMessage();
} 

Create ticket by Anonymous user, (*4)

// Create Anon Ticket
$ticket = new Ticket( $client );
$ticket->setSubject(<ticket subject>);
$ticket->setDescription(<ticket descripton>);
$ticket->setUser(<ticket user full name>);
$ticket->setEmail(<ticket email>);
$ticket->setPhone(<ticket phone>);
$ticket->setOrg(<ticket org>);

try {
    $ticket->create(); 
} catch( Exception $e ) {
    echo $e->getMessage();
} 

Get Ticket & its activities, (*5)

// Create Anon Ticket
$ticket = new Ticket( $client );

$ticket->get(<ticket id>);
echo $ticket->getSubject(); // all the field null if not found. 

$activities = $ticket->getActivity(); // get activities
var_dump($activities);

Change status of ticket, (*6)

// Get ticket
$ticket = new Ticket( $client );
$ticket->get(5);

try {
    $ticket->setPending(); 
    // $ticket->setClose(); 
    // $ticket->setSchedule(); 

} catch ( Exception $e ) {
    echo $e->getMessage();
}

Message ticket, (*7)

// Get ticket
$ticket = new Ticket( $client );
$ticket->get(<ticket id>);

try {

    $ticket->message( <ticket message> ); 

} catch ( Exception $e ) {
    echo $e->getMessage();
}

Transfer Ticket, (*8)

// Get ticket
$ticket = new Ticket( $client );
$ticket->get(<ticket id>);

try {
    $ticket->transfer(<queue id>); 
} catch ( Exception $e ) {
    echo $e->getMessage();
}

Brought to you by the LinkORB Engineering team


Check out our other projects at engineering.linkorb.com., (*9)

Btw, we're hiring!, (*10)

The Versions

24/11 2015

dev-master

9999999-dev https://github.com/linkorb/ticketbox-client

TicketBox Client for TicketBox Application

  Sources   Download

MIT

The Requires

 

The Development Requires

by LinkORB
by Kishan Thobhani

api php linkorb client-library ticketbox

24/11 2015

v1.1

1.1.0.0 https://github.com/linkorb/ticketbox-client

TicketBox Client for TicketBox Application

  Sources   Download

MIT

The Requires

 

The Development Requires

by LinkORB
by Kishan Thobhani

api php linkorb client-library ticketbox

18/09 2015

v1.0

1.0.0.0

TicketBox Client for TicketBox Application

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Kishan Thobhani