|
| 1 | +# perl-sdk |
| 2 | + |
| 3 | +... TODO ... this is an untouched copy of our php-sdk readme |
| 4 | + |
| 5 | +[](https://packagist.org/packages/hexonet/php-sdk) |
| 6 | +[](https://packagist.org/packages/hexonet/php-sdk) |
| 7 | +[](https://opensource.org/licenses/MIT) |
| 8 | +[](https://github.com/hexonet/php-sdk/blob/master/CONTRIBUTING.md) |
| 9 | +[](https://hexonet-sdk.slack.com/messages/CBF05V4CQ) |
| 10 | + |
| 11 | +This module is a connector library for the insanely fast HEXONET Backend API. For further informations visit our [homepage](http://hexonet.net) and do not hesitate to [contact us](https://www.hexonet.net/contact). |
| 12 | + |
| 13 | +## Resources |
| 14 | + |
| 15 | +* [Usage Guide](https://github.com/hexonet/php-sdk/blob/master/README.md#how-to-use-this-module-in-your-project) |
| 16 | +* [SDK Documenation](https://rawgit.com/hexonet/php-sdk/master/target/site/apidocs/net/hexonet/apiconnector/package-summary.html) |
| 17 | +* [HEXONET Backend API Documentation](https://github.com/hexonet/hexonet-api-documentation/tree/master/API) |
| 18 | +* [Release Notes](https://github.com/hexonet/php-sdk/releases) |
| 19 | +* [Development Guide](https://github.com/hexonet/php-sdk/wiki/Development-Guide) |
| 20 | + |
| 21 | +## How to use this module in your project |
| 22 | + |
| 23 | +We have also a demo app available showing how to integrate and use our SDK. See [here](https://github.com/hexonet/php-sdk-demo). |
| 24 | + |
| 25 | +### Requirements |
| 26 | + |
| 27 | +* Installed [composer](https://getcomposer.org/download/). |
| 28 | + |
| 29 | +### Download from packagist |
| 30 | + |
| 31 | +This module is available on the [PHP Package Registry](https://packagist.org/packages/hexonet/php-sdk). |
| 32 | + |
| 33 | +Run `composer require "hexonet/php-sdk:1.0.0"`. You find the available version listed on the registry page. |
| 34 | +In your script simply use `require 'vendor/autoload.php';` or `require 'vendor/hexonet/php-sdk';` |
| 35 | + |
| 36 | +### Usage Examples |
| 37 | + |
| 38 | +Please have an eye on our [HEXONET Backend API documentation](https://github.com/hexonet/hexonet-api-documentation/tree/master/API). Here you can find information on available Commands and their response data. |
| 39 | + |
| 40 | +#### Session based API Communication |
| 41 | + |
| 42 | +Not yet available, this needs a review of the SDK. |
| 43 | + |
| 44 | +#### Sessionless API Communication |
| 45 | + |
| 46 | +```php |
| 47 | +require __DIR__ . '/vendor/autoload.php'; |
| 48 | + |
| 49 | +// --- SESSIONLESS API COMMUNICATION --- |
| 50 | +$api = \HEXONET\Connection::connect(array( |
| 51 | + "url" => "https://coreapi.1api.net/api/call.cgi", |
| 52 | + "login" => "test.user", |
| 53 | + "password" => "test.passw0rd", |
| 54 | + "entity" => "1234", |
| 55 | + //"remoteaddr" => "1.2.3.4" //optional: use this in case of ip filter setting |
| 56 | +)); |
| 57 | + |
| 58 | +$r = $api->call(array( |
| 59 | + "COMMAND" => "StatusAccount" |
| 60 | +)); |
| 61 | +echo "<pre>" . htmlspecialchars(print_r($r->asHash(), true)) . "</pre>"; |
| 62 | +``` |
| 63 | + |
| 64 | +## Contributing |
| 65 | + |
| 66 | +Please read [our development guide](https://github.com/hexonet/java-sdk/wiki/Development-Guide) for details on our code of conduct, and the process for submitting pull requests to us. |
| 67 | + |
| 68 | +## Authors |
| 69 | + |
| 70 | +* **Anthony Schneider** - *development* - [ISharky](https://github.com/isharky) |
| 71 | +* **Kai Schwarz** - *development* - [PapaKai](https://github.com/papakai) |
| 72 | + |
| 73 | +See also the list of [contributors](https://github.com/hexonet/php-sdk/graphs/contributors) who participated in this project. |
| 74 | + |
| 75 | +## License |
| 76 | + |
| 77 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
0 commit comments