esyoil-gmbh / onencews
Http client for official 1nce rest api https://api.1nce.com
dev-master
2023-02-03 13:05 UTC
Requires
- guzzlehttp/guzzle: ~6.0
This package is auto-updated.
Last update: 2024-10-30 01:32:02 UTC
README
OnenceWS Http client for official 1nce rest api https://api.1nce.com
Installation
composer require pipinstallpip/onencews:dev-master
Make sure that you have the PHP Module for APCu
enabled and loaded. This is used to store the oauth2-token for subsequent requests, so we do not exhaust the ratelimit of the Endpoint.
You can check this by running:
php -m | grep apcu
in your terminal.
Usage
use pipinstallpip\onencews\OnenceWS; $clientId = 'yourclientid'; $clientSecret = 'yoursecretkey'; $api = new OnenceWS($clientId,$clientSecret); $response = $api->getSimsList(); //return all sims print_r($response);
Class methods
- getSimsList
- getSimReachibility
- getSimUsage
- getSimRemainingData
- getSimRemainingSms
- getSmsList
- getSimInfo
- getSimStatus
- getSimEvents
- getSmsDetails
- sendSms
- resetSim
- changeSimState
- deleteSpecificSms
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.