Giter Club home page Giter Club logo

quicktarot's Introduction

Netlify Status

Quick Tarot Screenshot

Quick Tarot

Quick Tarot is a NodeJS and vanilla JavaScript application that allows you to draw random tarot cards. Providing a fast and efficient way to generate sets of randomized cards, the application combines the Tarot Car API (below) with the original Rider-Waite Smith cards, which have been made accessible by Luciella Scarlett.


Tarot Card API

Explore this repo

For all your cybermysticism needs. ๐Ÿ”ฎ

Provides information parsed from AE Waite's The Pictorial Key to the Tarot, meeting the OpenAPI 3 spec. This was created as a friendly introduction to REST APIs.


API Usage

  1. See full documentation + play with the API on SwaggerHub

  2. See below for quick start

Quick start

JS:

fetch("https://tarot-api-3hv5.onrender.com/api/v1/cards/random?n=10")
  .then(function (response) {
    return response.json();
  })
  .then(function (response) {
    // handle ten random cards
  })
  .catch(function (error) {
    // handle what went wrong
  });

Condensed documentation

GET path Result Params
/api/v1/ or /api/v1/cards return all cards
/api/v1/cards/:name_short return card with specified name_short minors: /swac, /wa02, ..., /cupa, /pequ, /waqu, /swki, majors /ar01, /ar02, .../ar[n]
/api/v1/cards/search search all cards q={text}, meaning={text}, meaning_rev={text}
/api/v1/cards/random get random card(s) optional n={integer <= 78}

Examples:

Get all cards with word "peace" in meaning (reversed or upright):

https://tarot-api-3hv5.onrender.com/api/v1/cards/search?meaning=peace (free dyno == super slow, sorry)

Get 10 random cards:

https://tarot-api-3hv5.onrender.com/api/v1/cards/random?n=10

Get the Knight of Wands:

https://tarot-api-3hv5.onrender.com/api/v1/cards/wakn


๐Ÿ’ป Local development

(Novice-friendly!)

  1. You are welcome to just grab the JSON file that serves as the data source and use it for your own projects.

  2. Clone or fork this repository and install dependencies locally. Requires Node 10.0.0 or higher, and npm 6.0.0 or higher.

git clone https://github.com/gitmohamed/quicktarot.git
# or [email protected]:gitmohamed/quicktarot.git

# -OR- click fork on this project's Github page, then:

git clone https://github.com/YOUR-USERNAME/quicktarot.git

Then:

cd quicktarot

npm install

npm run dev

quicktarot's People

Contributors

ekelen avatar succubyss avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

quicktarot's Issues

Long api response time

Perhaps include a loader or visual indicator while waiting for api response

EDIT
To clarify there was a few milliseconds of response time that gave the user no indication of what was taking place, with a sudden jump to the card show animation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.