testmonitor/topdesk-client

The TestMonitor TOPdesk client.

v2.2.0 2024-07-01 13:06 UTC

This package is auto-updated.

Last update: 2024-12-07 08:18:24 UTC


README

Latest Stable Version CircleCI StyleCI codecov License

This package provides a very basic, convenient, and unified wrapper for the TOPdesk REST API.

Table of Contents

Installation

To install the client you need to require the package using composer:

$ composer require testmonitor/topdesk-client

Use composer's autoload:

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

You're all set up now!

Usage

You'll have to instantiate the client using your credentials:

$topdesk = new \TestMonitor\TOPdesk\Client('https://mytopdesk.topdesk.net', 'username', 'password');

Next, you can start interacting with TOPdesk.

Examples

Get a list of incidents out of TOPdesk:

$topdesk->incidents();

or create a new incident in TOPdesk:

$incident = $topdesk->createIncident(new \TestMonitor\TOPdesk\Resources\Incident([
    'callerName' => 'John Doe',
    'callerEmail' => 'johndoe@testmonitor.com',
    'status' => 'firstLine',
    'number' => 'I1234',
    'briefDescription' => 'Some Request',
    'request' => 'Some Request Description'
]));

Tests

The package contains integration tests. You can run them using PHPUnit.

$ vendor/bin/phpunit

Changelog

Refer to CHANGELOG for more information.

Contributing

Refer to CONTRIBUTING for contributing details.

Credits

License

The MIT License (MIT). Refer to the License for more information.