kyvio / stackpath-sdk-client
StackPath SDK / Client in PHP from Kyvio
Installs: 4 153
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 1
Requires
- guzzlehttp/guzzle: 6.3 - 7.5
This package is auto-updated.
Last update: 2024-09-19 22:59:41 UTC
README
This is a fork from https://github.com/newsdaycom/stackpath-php-sdk It did not give us near enough functionality (e.g. lack of status code which is needed to check failure / success for various SP endpoints) hence we wrote this SDK and decided to share it.
Note this package was written in quite the haste :) This package is open source and we are open to pull requests for new features.
Install
Add it by running: composer require kyvio/stackpath-sdk-client
Configuration
You have to pass a config array like this: $stackPath = [ 'stack_id' => '', 'client_id' => '', 'secret_id' => '', 'ip_to_map' => '', 'waf_options_off' => ['CSRF', 'Anti Scraping'], ]
Use
try{
$sp = new \StackPath\StackPath($stackPath);
}
catch(\Exception $e){
$msg = $e->getMessage();
$this->warn($msg);
}
Docs
Check the PHPDoc in the class file.
Hope it helps you.