Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Mplus Software committed Jul 8, 2014
2 parents 8c5a1fd + 9b3b3bf commit 492095f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,39 @@ mplus-api-client-php
====================

PHP client for the Mplus Q-line API.

### Example of usage:

The following script will connect to the API with your credentials and try to request the currently running version of the API.

```php
<?php

require_once('Mplusqapiclient.php');

$mplusqapiclient = new Mplusqapiclient();
$mplusqapiclient->setApiServer($your_api_url);
$mplusqapiclient->setApiPort(443);
$mplusqapiclient->setApiPath($your_api_path);
$mplusqapiclient->setApiFingerprint($certificate_fingerprint);
$mplusqapiclient->setApiIdent($your_api_ident);
$mplusqapiclient->setApiSecret($your_api_secret);

try {
$mplusqapiclient->initClient();
} catch (MplusQAPIException $e) {
exit($e->getMessage());
}

try {
$api_version = $mplusqapiclient->getApiVersion();
echo sprintf('Current API version: %d.%d.%d',
$api_version['majorNumber'],
$api_version['minorNumber'],
$api_version['revisionNumber']);
} catch (MplusQAPIException $e) {
exit($e->getMessage());
}
```

Visit the [Mplus Developers website](http://developers.mpluskassa.nl/php/) for more information.

0 comments on commit 492095f

Please sign in to comment.