टैरो
तीन डेक: Rider-Waite-Smith (78 कार्ड), मार्सेली टैरो (78) और लेनोरमंड (36)। प्रत्येक कार्ड प्रत्येक टैरो प्रतिक्रिया में एक छवि रखता है, और POST /v1/interpret/tarot स्प्रेड को व्याख्या में बदल देता है: प्रत्येक स्थिति संदर्भ में, पूरे स्प्रेड का सारांश और एक सलाह.
कार्ट आर्ट चुनें
Section titled “कार्ट आर्ट चुनें”GET /v1/tarot/decks प्रत्येक डेक, इसके स्प्रेड्स और उन सेट्स को लौटाता है जिन्हें किसी भी टैरो रूट पर art के रूप में पास किया जा सकता है (POST बॉडी में या GET में ?art= के रूप में)। सभी सेट्स सार्वजनिक डोमेन हैं और हमारे CDN से दिए जाते हैं।
| डेक | art | कार्ड |
|---|---|---|
| Rider-Waite-Smith | rws-1909 (डिफ़ॉल्ट), rws-restored, rws-vector | 78 |
| मार्सेली टैरो | arnoult-1748 | 78 |
| लेनोरमंड | dondorf | 36 में से 35, मून के बिना |
प्रत्येक कार्ड image प्राप्त करता है जिसमें urlSmall (300 px चौड़ाई, पृष्ठ पर कार्ड्स के लिए लगभग 150 px), url (600 px), url2x (1200 px), width, height और art होता है। स्प्रेड में भी back लौटाया जाता है, कार्ड की पृष्ठ, ताकि पृष्ठ पहले कार्ड्स उल्टा दिखा सके। किसी अन्य डेक का art 400 INVALID_ART देगा साथ में वैध मानों की सूची। जिस कार्ड के लिए सेट में छवि नहीं होती (लेनोरमंड में मून), उसे इस सेट के missing में указано होता है और वह बिना image के आता है, इसलिए उसके लिए टेक्स्ट कार्ड दिखाओ।
curl -X POST https://api.astroway.info/v1/tarot/rider-waite/draw/three-card \ -H "X-Api-Key: aw_live_your_key_here" \ -H "Content-Type: application/json" \ -d '{ "seed": 12345, "art": "rws-restored" }'{ "drawn": [ { "position": { "index": 0, "name": "Past", "meaning": "Forces from the past shaping the situation." }, "card": { "slug": "8-of-pentacles", "name": "Eight of Pentacles", "image": { "url": "https://cdn.astroway.info/tarot/rws-restored/8-of-pentacles.webp", "url2x": "https://cdn.astroway.info/tarot/rws-restored/8-of-pentacles@2x.webp", "urlSmall": "https://cdn.astroway.info/tarot/rws-restored/8-of-pentacles-300.webp", "width": 600, "height": 1028, "art": "rws-restored" } }, "reversed": false } ], "back": { "url": "https://cdn.astroway.info/tarot/rws-1909/back.webp", "url2x": "https://cdn.astroway.info/tarot/rws-1909/back@2x.webp", "urlSmall": "https://cdn.astroway.info/tarot/rws-1909/back-300.webp", "width": 600, "height": 1039, "art": "rws-1909" }}स्प्रेड POST /v1/tarot/rider-waite/draw/three-card की कीमत 10 क्रेडिट है।
मॉडल के बिना कार्ड पाठ
Section titled “मॉडल के बिना कार्ड पाठ”GET /v1/public/tarot/texts?cards=the-fool,9-of-swords&lang=uk बिना कुंजी के काम करता है और प्रत्येक कार्ड के लिए description लौटाता है जिसमें तीन पैराग्राफ होते हैं (छवि, सीधा अर्थ, उल्टा अर्थ) और love, career, finance, health और spirit के बारे में पाठ upright और reversed के लिए, साथ में स्थानीकृत नाम name और प्रत्येक पक्ष पर अधिकतम पाँच keywords। यदि cards नहीं दिया गया तो सभी 78 लौटते हैं। चूंकि टेक्स्ट नहीं बदलते, इसलिए उन कार्ड्स को डाउनलोड करो जो पृष्ठ दिखाता है और उन्हें कैश करो।
curl 'https://api.astroway.info/v1/public/tarot/texts?cards=the-fool,9-of-swords&lang=uk'पूरे स्प्रेड की व्याख्या
Section titled “पूरे स्प्रेड की व्याख्या”POST /v1/interpret/tarot डेक, स्प्रेड, कार्ड और वैकल्पिक प्रश्न लेता है और language (21 भाषाओं) में भाषा में व्याख्या लिखता है। कार्ड्स को स्लग के रूप में, ऑब्जेक्ट्स { "slug", "reversed" } के रूप में या drawn массивом के रूप में भेजा जा सकता है, जो किसी भी स्प्रेड प्रतिक्रिया से बिना बदलाव के लिया जा सकता है।
const headers = { 'Content-Type': 'application/json', 'X-Api-Key': process.env.ASTROWAY_API_KEY };const api = (path, body) => fetch(`https://api.astroway.info/v1${path}`, { method: 'POST', headers, body: JSON.stringify(body) }).then((r) => r.json());
const { data: spread } = await api('/tarot/rider-waite/draw/three-card', { art: 'rws-1909' });const { data: reading } = await api('/interpret/tarot', { spread: 'three-card', question: 'What should I focus on at work?', cards: spread.drawn, language: 'en',});
for (const p of reading.positions) { console.log(p.position, p.card.name, p.reversed ? '(reversed)' : '', p.card.image.url); console.log(' ', p.reading);}console.log('Summary:', reading.synthesis);उत्तर में positions[] (स्थिति, image वाला कार्ड, reversed, reading), synthesis, advice और disclaimer होते हैं। Rider-Waite-Smith कार्ड्स में additionally nameLocalized और positionLocalized भी होते हैं, व्याख्या की भाषा में। व्याख्या की कीमत 100 क्रेडिट (Tier 4) है और यह Free टियर पर उपलब्ध है; अपने मॉडल की कुंजी के साथ यह सस्ता होता है, देखें अपना मॉडल कुंजी।