kanata-php / sdk-util
Installs: 247
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kanata-php/sdk-util
Requires
- guzzlehttp/guzzle: ^7.5
This package is auto-updated.
Last update: 2025-10-06 08:52:24 UTC
README
This is a helper package to provide tools for SDKs.
Usage
use KanataSdk\Sdk; use KanataSdk\Request; use KanataSdk\Response; class ExampleSdk extends Sdk { public function getResource(): Response { return $this->get( url: $this->options['api-url'] . '/api/resource', ); } } $token = 'some-token-here'; $options = [ 'api-url' => 'https://some-url', ]; $exampleSdk = new ExampleSdk($token, $options); $response = $exampleSdk->getResource();
Info: this SDK at this moment expects the API to expect the
Token
at the headerAuthorization: Bearer $token
model.
Installation
composer require kanata-php/sdk-util
Motivation
The routine of building clients for APIs always goes through the same steps. Some of those are contained in this package.