xequals-nz / nec-id-php
0.1
2020-03-23 11:04 UTC
Requires
- aws/aws-sdk-php: ^3.0@dev
- guzzlehttp/guzzle: ~6.0
- vlucas/phpdotenv: ^4.1@dev
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-03-22 00:01:40 UTC
README
This package connects the NEC ID REST API with PHP.
API Documentation is available on https://docs.id.nec.com.au/en/latest/
Installing
Simply require the package from composer.
composer require xequals-nz/nec-id-php
In progress
This is the status of the API endpoints implemented by this library:
Usage example with dotenv
Note that this could be instantiated without dot env, just pass the credentials into the setCredentials method as an array.
- Copy .env.example into .env and fill the required keys.
- Access Key
- Secret Key
- AWS Region (This value normally should be ap-southeast-2)
- API Endpoint (This value normally should be https://api.id.nec.com.au/v1.1)
- API Key of the application
- Ensure that dotenv is loaded
require __DIR__ .'/../vendor/autoload.php';
$dotenv = \Dotenv\Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();
- Load the credentials
\NecId\Resource::setCredentials();
- Instance the class required, for instance, tags.
$tag_resource = new Tag();
- Call the method, for instance, listing tags.
$tag_resource->listTags()
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Acknowledgments
- XEQUALS - Development and maintenance.