Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yunkhngn/tarot-api
Tarot API using ExpressJS and Nodejs
https://github.com/yunkhngn/tarot-api
api expressjs nodejs yarn
Last synced: about 1 month ago
JSON representation
Tarot API using ExpressJS and Nodejs
- Host: GitHub
- URL: https://github.com/yunkhngn/tarot-api
- Owner: yunkhngn
- License: mit
- Created: 2023-05-14T16:04:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-13T07:06:15.000Z (4 months ago)
- Last Synced: 2024-09-13T18:48:15.352Z (4 months ago)
- Topics: api, expressjs, nodejs, yarn
- Language: JavaScript
- Homepage: https://tarotapi.vercel.app
- Size: 90.8 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tarot API 🔮
> Currently working right now!
### Tarot API provides information parsed from AE Waite's The Pictorial Key to the Tarot. This was created using ExpressJS and Nodejs.
*Author: @yunkhngn*
## Quick start
```javascript
fetch("https://tarotapi.vercel.app/api/")
.then(function (response) {
return response.json();
})
.then(function (response) {
//extract data
})
.catch(function (error) {
// handle what went wrong
});
```## Documentation
| GET path | Result| Params|
| :------------ | ---------- | :----------- |
| `/api/` or `/api/cards` | return all cards| |
| `/api/cards/:name` | return card with specified `name` | `'/the-magician'`,`'/the-fool'`... |
| `/api/cards/:name/:search/`| search fields of one cards|`/the-magician/desc`|
| `/api/random`| get 3 random card| |
| `/api/answer`| get random advices or answer for specific questions| |**JSON format:**
```json
{
"type":"Type majors or minors",
"slug":"Slug",
"name_short":"Short name",
"name":"Name",
"value":"Card index (string)",
"value_int": "Card index (number)",
"meaning_up": "Meaning up.",
"meaning_rev": "Meaning reverse.",
"desc": "Descriptions"
}
```## Local development
1. Clone this repository and install dependencies locally.
```sh
git clone https://github.com/yunkhngn/tarot-api.git
```2. Then
```sh
cd tarot-apicd api
yarn install
#or npm installnode index.js
```
3. Install nodemon (optional for hot reload)
```sh
yarn add nodemonnodemon index.js
```## License & contributions
Contributions to Repository are welcome! To contribute, please follow these steps:
1. Fork the repository
2. Create a new branch for your feature or fix
3. Make changes and commit them to your branch
4. Submit a pull request to the main repository.Tarot API's Repository is licensed under the GNU License. See LICENSE for more information.