// sdk · Componente Web
Componente web AstroWay (alpha)
Roata natală, faza lunii, compatibilitate, tarot și horoscop ca elemente HTML simple pentru orice site: un tag <script> de la un CDN, sau npm install. Graficele sunt desenate cu același cod ca API-ul, așa că roata de pe pagina ta se potrivește cu ce returnează /v1/render. Alpha: numele atributelor pot să se schimbe încă înainte de 1.0.
// 01 / install
Instaleaz
npm install @astroway/ui@alpha pnpm
pnpm add @astroway/ui yarn
yarn add @astroway/ui CDN
<script type="module" src="https://cdn.jsdelivr.net/npm/@astroway/ui/dist/cdn/index.js"></script> import: import '@astroway/ui';
Vezi n registru → @astroway/ui
// 02 / highlights
Caracteristici
- Elemente custom simple
- Același SVG ca /v1/render
- Fără cheie pentru date publice
- Cheie pk_ cu origine
- 21 de limbi din API
// 03 / first request
Primul request
<script type="module" src="https://cdn.jsdelivr.net/npm/@astroway/ui/dist/cdn/index.js"></script>
<!-- keyless: the moon phase in the visitor's language -->
<aw-moon-phase lang="uk"></aw-moon-phase>
<!-- a publishable pk_ key bound to your domain, credit cap and endpoint list -->
<aw-natal-wheel api-key="pk_live_..." date="1990-07-14" time="14:30"
latitude="50.45" longitude="30.52" timezone-offset="3"></aw-natal-wheel> Start cu Componente Web
10 000 de credite gratuite pe lun. SDK open-source, generat din OpenAPI 3.1, mereu sincronizat cu backend-ul.