// sdk · PHP
PHP SDK voor de AstroWay API
Officiële `astroway/sdk` op Packagist — gebouwd op Guzzle 7 + PSR-18. PHP 8.1+ (alleen-lezen eigenschappen, constructor promotie). Stainless-stijl foutenhierarchie, ingebouwd retry-middleware op 408/409/429/5xx, twee auth-schemes (X-Api-Key standaard of Bearer).
// 01 / install
Installeren
composer require astroway/sdk importeren: use Astroway\Astroway;
Bekijk in de registry → astroway/sdk
// 02 / highlights
Kenmerken
- PHP 8.1+
- Guzzle 7 + PSR-18
- Ingebouwd retry-middleware
- Stainless-stijl fouten
- Auto-mirror op Packagist
// 03 / first request
Eerste verzoek
<?php
use Astroway\Astroway;
$aw = new Astroway(['apiKey' => getenv('ASTROWAY_API_KEY')]);
$chart = $aw->post('/chart', body: [
'date' => '1990-07-14',
'time' => '14:30:00',
'timezoneOffset' => 3,
'latitude' => 50.4501,
'longitude' => 30.5234,
'houseSystem' => 'P',
]);
echo $chart['angles']['asc']['sign']; Start met PHP
10.000 credits gratis per maand. Open-source SDK, gegenereerd vanuit OpenAPI 3.1, altijd synchroon met de backend.