AstroWay/api v2.74.2 · id
semua sistem normal
// sdk · PHP

SDK PHP untuk API AstroWay

Resmi `astroway/sdk` di Packagist — dibangun di atas Guzzle 7 + PSR-18. PHP 8.1+ (properti readonly, promosi konstruktor). Hierarki kesalahan gaya Stainless, middleware retry bawaan pada 408/409/429/5xx, dua skema autentikasi (X-Api-Key default atau Bearer).

// 01 / install

Pasang

composer require astroway/sdk

impor: use Astroway\Astroway;

// 02 / highlights

Fitur Unggulan

// 03 / first request

Permintaan pertama

<?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'];

Mulai dengan PHP

10.000 kredit gratis per bulan. SDK open-source, dibuat dari OpenAPI 3.1, selalu sinkron dengan backend.

99.9% SLA · paket berbayar · 30d status →