AstroWay/api v2.254.12 · tr
tüm sistemler normal
// sdk · TypeScript

AstroWay API için TypeScript SDK

Resmi @astroway/sdk - openapi-fetch üzerinde ince bir sarıcı (~6 KB çalışma zamanı). IDE'nizdeki tüm endpoint'ler için yol otomatik tamamlama + istek/yanıt türleri. Stainless tarzı hata hiyerarşisi, 408/409/429/5xx için yerleşik yeniden deneme, OIDC + SLSA L3 kökeni.

// 01 / install

Kur

npm install @astroway/sdk
pnpm pnpm add @astroway/sdk
yarn yarn add @astroway/sdk
bun bun add @astroway/sdk

import: import { Astroway } from '@astroway/sdk';

// 02 / highlights

Öne çıkanlar

// 03 / first request

İlk istek

import { Astroway } from '@astroway/sdk';

const aw = new Astroway({ apiKey: process.env.ASTROWAY_API_KEY! });

const { data: chart } = await aw.client.POST('/chart', {
  body: {
    date: '1990-07-14',
    time: '14:30:00',
    timezoneOffset: 3,
    latitude: 50.4501,
    longitude: 30.5234,
    houseSystem: 'P',
  },
});

// aw.client.POST is the raw typed fetch, so `chart` is the { ok, data } envelope
console.log(chart.data.houses.ascendant);  // 212.0952574979425

TypeScript ile başla

Ayda 10.000 kredi ücretsiz. Open-source SDK, OpenAPI 3.1’den oluşturulur, her zaman arka uçla senkron.

%99,9 SLA · ücretli planlar · 30g durum →