Coder Social home page Coder Social logo

ygo-card-api's Introduction

Yugioh - Card - API

npm license downloads

A package that supports working with Yugioh card data.

Table of Contents

Introduction

The Yugioh - Card - API package was created to provide an easy and efficient way to work with Yugioh card data. This package addresses the need for a standardized and convenient tool to search, retrieve, and manipulate Yugioh card information. Whether you're a developer building a Yugioh-themed application, a fan looking to organize your collection, or a researcher analyzing card data, this package offers the functionality you need.

Features

List out the main features of your project:

  • Card Search API: Quickly search for Yugioh cards by name, type, attribute, and more.
  • Card Data Retrieval: Access detailed information about each card, including stats, effects, and descriptions.

Installation

Provide clear instructions on how to install your package.

npm install ygo-card-api

Examples

const { Data, CardSearch } = require("ygo-card-api");

// Load data from JSON file
const dataFromJson = new Data("cards.json");
// Or from api
const dataFromAPI = new Data();
// save file with path
dataFromAPI.save("your_path.json");

// Fetches data asynchronously from 'dataFromAPI' 
// and initializes a new CardSearch instance with the retrieved data.
// 'await' ensures that the data retrieval completes before assigning it to 'cards'.
const cards = new CardSearch(await dataFromAPI.getData());

// SEARCH

// Sort the format of the cards (tcg, goat, ocg goat, speed duel, master duel, rush duel, duel links).
const duellinks = cards.search({ formats: "Duel Links" });
// Log: List of duel links card
console.log(duellinks);

// Search Option: formats, name, fname, id, konami_id, type, atk, def, level, race, attribute,
// link, linkmarker, scale, cardsetm archetype, banlist, staple, has_effect, startdate, enddate, dateregion.
// misc: "yes" (if you want additional info).
// sort: search_option (if you want sort with name or atk,...)
const params = {
  name: "Baby Dragon|Time Wizard",
  atk: "1200",
  sort: "name",
  misc: "yes",
};
const results = cards.search(params);
// search result
console.log(results);

Contributing

Explain how others can contribute to your project.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details. Yu-Gi-Oh! is a trademark of Shueisha and Konami. This project is not affiliated with or endorsed by Shueisha or Konami.

ygo-card-api's People

Contributors

vinhvizg1040 avatar

Watchers

 avatar  avatar

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.