Halloween Fortune Challenge: Discover Your Future🎃
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In this Halloween challenge, you’ll become a master of the mystical arts—by calling a Cloud API. No crystal ball needed— just Postman or a bit of code magic.
Call upon the Tarot Card API to draw a card from the deck of fate. Will it predict success, love, or perhaps… something more mysterious?
Once you retrieve your card, share the name, its upright meaning, and its reversed meaning. Who knows what fortune (or misfortune) awaits? 🔮
There are two options for completing this challenge: using Postman, or JavaScript. If you are new to programming, you might find Postman an easier route, but this can be completed either way!
Are you ready to uncover your Halloween fortune? Let’s find out… if you’re brave enough!
Option A: Call the Tarot Card API with Postman
-
Open Postman
-
Download or access the in-browser version here.
-
-
Create a new request.
-
Select “New” in the top left hand corner, and then HTTP request.
-
Select
GET
as your method.-
A
GET
request is used to retrieve data from a server (in this case to retrieve a random tarot card from the server). -
Other common HTTP request types include:
-
POST
: Sends data to the server to create or update resources. For example, when you submit a form on a website, it often uses aPOST
request. -
PUT
: Updates an existing resource with new data. For example, updating an email in a database. -
DELETE
: Removes a specified resource from the server, like deleting an item from a database.
-
-
-
Paste in your URL:
https://tarotapi.dev/api/v1/cards/random?n=1
-
Note: if you wanted to return multiple cards you could change n=1 to a different number (there are 78 cards in a Tarot deck!).
-
-
-
Send the request by clicking the "Send" button.
-
Find your fortune in the response!
-
Look for the "name" of your card.
-
Find the "meaning_up" (for an upright card) and "meaning_rev" (for a reversed card).
Example Response:
{ "nhits": 1, "cards": [ { "name": "Two of Cups", "name_short": "cu02", "value": "two", "value_int": 2, "suit": "cups", "type": "minor", "meaning_up": "Love, passion, friendship, affinity, union, concord, sympathy, the interrelation of the sexes, and--as a suggestion apart from all offices of divination--that desire which is not in Nature, but by which Nature is sanctified.", "meaning_rev": "Lust, cupidity, jealousy, wish, desire, but the card may also give, says W., \"that desire which is not in nature, but by which nature is sanctified.\"", "desc": "A youth and maiden are pledging one another, and above their cups rises the Caduceus of Hermes, between the great wings of which there appears a lion's head. It is a variant of a sign which is found in a few old examples of this card. Some curious emblematical meanings are attached to it, but they do not concern us in this place." } ] }
-
Bonus: your API was automatically formatted with “Pretty” JSON code. Try clicking “Visualize” in Postman and watch it magically format your API call into a table!
Option B: Call the Tarot Card API with JavaScript
-
Set up your local environment
-
First, create a folder for this project. You can name it whatever you want, but I named mine
Fortune Teller
. -
Open your favorite IDE. I like Visual Studio Code.
-
Create an
index.html
file in your IDE.
-
-
Write the code to call the API
-
Open the
index.html
file. Copy and paste the following code:
-
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tarot Card API Fortune</title>
</head>
<body>
<!-- Text and styling the page -->
<h1>Reveal Your Halloween Tarot Card!</h1>
<button id="drawCardButton">Draw a Card</button>
<p id="cardName"></p>
<p id="meaningUp"></p>
<p id="meaningRev"></p>
<script>
// Function to call the Tarot Card API
function drawTarotCard() {
fetch('https://tarotapi.dev/api/v1/cards/random?n=1')
.then(response => response.json())
.then(data => {
const card = data.cards[0]; // Get the first card
document.getElementById('cardName').textContent = `Card Name: ${card.name}`;
document.getElementById('meaningUp').textContent = `Upright Meaning: ${card.meaning_up}`;
document.getElementById('meaningRev').textContent = `Reversed Meaning: ${card.meaning_rev}`;
})
.catch(error => console.error('Error:', error));
}
// Add event listener to the button
document.getElementById('drawCardButton').addEventListener('click', drawTarotCard);
</script>
</body>
</html>
-
Run the HTML file
-
Save the
index.html
file. -
Open the folder where your
index.html
file is located. -
Open the file in your web browser (you may need to double click)!
-
-
Draw your Tarot Card
-
On the webpage, you’ll see a button labeled "Draw a Card." Click the button, and it will fetch a random tarot card from the API.
-
Below the button, you’ll see the card name, its upright meaning, and its reversed meaning displayed.
-
Now you’ve conjured your Halloween fortune! Share your fortune below to get your Halloween badge. Keep honing your API skills because we’re brewing up some exciting API improvements. The future is bright, and your Alteryx API wizardry will soon be stronger than ever!
- Labels:
-
API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
With the JavaScript version I got Wheel Of Fortune,
Upright Meaning: Destiny, fortune, success, elevation, luck, felicity.
Reversed Meaning: Increase, abundance, superfluity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I also couldn't get the visualiser to work but:
Five of Wands
Upright
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Type Name Short Name Value Value Int Meaning Up Meaning Rev Description
major | ar01 | The Magician | 1 | 1 | Skill, diplomacy, address, subtlety; sickness, pain, loss, disaster, snares of enemies; self-confidence, will; the Querent, if male. | Physician, Magus, mental disease, disgrace, disquiet. | A youthful figure in the robe of a magician, having the countenance of divine Apollo, with smile of confidence and shining eyes. Above his head is the mysterious sign of the Holy Spirit, the sign of life, like an endless cord, forming the figure 8 in a horizontal position . About his waist is a serpent-cincture, the serpent appearing to devour its own tail. This is familiar to most as a conventional symbol of eternity, but here it indicates more especially the eternity of attainment in the spirit. In the Magician's right hand is a wand raised towards heaven, while the left hand is pointing to the earth. This dual sign is known in very high grades of the Instituted Mysteries; it shews the descent of grace, virtue and light, drawn from things above and derived to things below. The suggestion throughout is therefore the possession and communication of the Powers and Gifts of the Spirit. On the table in front of the Magician are the symbols of the four Tarot suits, signifying the elements of natural life, which lie like counters before the adept, and he adapts them as he wills. Beneath are roses and lilies, the flos campi and lilium convallium, changed into garden flowers, to shew the culture of aspiration. This card signifies the divine motive in man, reflecting God, the will in the liberation of its union with that which is above. It is also the unity of individual being on all planes, and in a very high sense it is thought, in the fixation thereof. With further reference to what I have called the sign of life and its connexion with the number 8, it may be remembered that Christian Gnosticism speaks of rebirth in Christ as a change "unto the Ogdoad." The mystic number is termed Jerusalem above, the Land flowing with Milk and Honey, the Holy Spirit and the Land of the Lord. According to Martinism, 8 is the number of Christ. |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Appropriate? Some might say yes! 🤣
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Super fun exercise.
I got "Four of Pentacles".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I got 'The Moon', very apt for Halloween night.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Got "six of cups".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
THREE OF SWORDZ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I got The Hierophant!
It means , "Marriage, alliance, captivity, servitude; by another account, mercy and goodness; inspiration; the man to whom the Querent has recourse."
OR
It means, "Society, good understanding, concord, overkindness, weakness."
I don't know much about tarot cards, so I had to find a picture of the card I drew :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Six of Cups
A card of the past and of memories, looking back, as--for example--on childhood; happiness, enjoyment, but coming rather from the past; things that have vanished. Another reading reverses this, giving new relations, new knowledge, new environment, and then
- « Previous
-
- 1
- 2
- Next »