// sdk · वेब कॉम्पोनेन्ट्स
AstroWay वेब कॉम्पोनेन्ट्स (alpha)
Natal wheel, moon phase, compatibility, tarot और horoscope को साधारण HTML एलिमेंट्स के रूप में किसी भी साइट पर इस्तेमाल कर सकते हो: CDN से एक <script> टैग, या npm install. चार्ट वही कोड से बनते हैं जो API में है, इसलिए तुम्हारे पेज का व्हील /v1/render के आउटपुट से मेल खाता है. Alpha: attribute नाम अभी भी 1.0 से पहले बदल सकते हैं.
// 01 / install
इंस्टॉल करें
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 '@astroway/ui';
रजिस्ट्री देखें → @astroway/ui
// 02 / highlights
खासियतें
- साधारण कस्टम एलिमेंट्स
- उसी SVG जैसा /v1/render
- पब्लिक डेटा में कुंजी नहीं
- pk_ कुंजी: origins, cap, scope
- API प्रतिक्रियाओं में 21 भाषाएँ
// 03 / first 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> वेब कॉम्पोनेन्ट्स से शुरू करें
महीने में 10,000 क्रेडिट मुफ्त। ओपन-सोर्स SDK, OpenAPI 3.1 से जनरेट, हमेशा बैकएंड के साथ सिंक में रहता है।