brightnucleus / jasper-client
SOAP client to interact with the Jasper Wireless Control Center.
Requires
- brightnucleus/config: ^0.4.3
- brightnucleus/exceptions: ^0.3
- guzzlehttp/guzzle: ^6.2
- http-interop/http-factory-guzzle: ^0.1.0
- phpro/soap-client: ^0.5.2
- psr/log: ^1.0
Requires (Dev)
- php-vcr/php-vcr: ^1.3
- php-vcr/phpunit-testlistener-vcr: ^3.0
- phpunit/phpunit: ~6
- symfony/filesystem: ~2.8|~3.0
- zendframework/zend-code: ^3.1
This package is auto-updated.
Last update: 2024-12-16 05:48:12 UTC
README
SOAP client to interact with the Jasper Wireless Control Center.
This library is not yet feature-complete and still a work-in-progress.
Table Of Contents
Installation
The best way to use this package is through Composer:
composer require brightnucleus/jasper-client
Basic Usage
The general usage is pretty simple. You fetch an instance of the client you need, and then call one of its methods, passing in the corresponding request value object to set the parameters.
Example:
use Brightucleus\JasperClient\EchoClient; use Brightucleus\JasperClient\SoapTypes\EchoClient\EchoRequest; $client = new EchoClient(); $result = $client->echo(new EchoRequest('Hello World!')); echo $result->getValue(); // Output: 'Hello World!'
To find out how to configure a request, see the constructor in the corresponding request value object.
A specific request will always return the matching response, provided the request was successful.
If the request was unsuccessful, a SoapException
will be thrown.
Running The Tests
To run the tests, you need to set environment variables, so that the test code knows how to connect to the correct Jasper environment.
export CISCO_JASPER_API_ENVIRONMENT=sandbox export CISCO_JASPER_API_LICENSE_KEY=<your API license key> export CISCO_JASPER_USERNAME=<login username> export CISCO_JASPER_PASSWORD=<login password> export CISCO_JASPER_TEST_ACCOUNT_ID=<test account ID>
Then you can run all the tests with the following command:
vendor/bin/phpunit
To run only a specific test suite, you can use the following command:
vendor/bin/phpunit --testsuite=<suites to test, separated with commas>
You can get a list of available test suites with the following command:
vendor/bin/phpunit --list-suites
Contributing
All feedback / bug reports / pull requests are welcome.
License
Copyright (c) 2017 Alain Schlesser, Bright Nucleus
This code is licensed under the MIT License.