https://github.com/rokhimin/ygoprodeck
Ygoprodeck ruby API wrapper for search yugioh card | Gem Library
https://github.com/rokhimin/ygoprodeck
ruby yugioh
Last synced: about 1 year ago
JSON representation
Ygoprodeck ruby API wrapper for search yugioh card | Gem Library
- Host: GitHub
- URL: https://github.com/rokhimin/ygoprodeck
- Owner: rokhimin
- License: mit
- Created: 2019-10-28T14:57:12.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-09T02:37:08.000Z (over 1 year ago)
- Last Synced: 2025-03-09T03:24:46.045Z (over 1 year ago)
- Topics: ruby, yugioh
- Language: Ruby
- Homepage:
- Size: 48.8 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Ygoprodeck

[](https://rubygems.org/gems/ygoprodeck)
[](https://rubygems.org/gems/ygoprodeck)
API wrapper for search yugioh card
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'ygoprodeck'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install ygoprodeck
## Usage
First :
```ruby
require 'ygoprodeck'
```
Fuzzy search :
```ruby
Ygoprodeck::Fname.is(NAME_CARD)
```
Normal search :
```ruby
Ygoprodeck::Name.is(NAME_CARD)
```
Random search :
```ruby
Ygoprodeck::Card.random
```
List search :
```ruby
Ygoprodeck::List.is(NAME_CARD)
```
Archetype search :
```ruby
Ygoprodeck::Archetype.is(NAME_ARCHETYPE)
```
All card sets :
```ruby
Ygoprodeck::Card.sets
```
Banlist (TCG, OCG, GOAT) :
```ruby
Ygoprodeck::Banlist.tcg
Ygoprodeck::Banlist.ocg
Ygoprodeck::Banlist.goat
```
Check Database Version :
```ruby
Ygoprodeck::CheckDbVer.info
```
or look [examples](https://github.com/rokhimin/ygoprodeck/blob/master/examples)
#### Noted
Rate Limiting on the API is enabled from YGOPRODECK. The rate limit is 20 requests per 1 second
#### Response Information
##### Monster Cards
- id - ID or Passocde of the card.
- name - Name of the card.
- type - The type of card you are viewing (Normal Monster, Effect Monster, Synchro Monster, etc).
- desc - Card description/effect.
- atk - The ATK value of the card.
- def - The DEF value of the card.
- level - The Level/RANK of the card.
- race - The card race which is officially called type (Spellcaster, Warrior, Insect, etc).
- attribute - The attribute of the card.
##### Spell/Trap Cards
- id - ID or Passocde of the card.
- name - Name of the card.
- type - The type of card you are viewing (Spell Card or Trap Card).
- desc - Card description/effect.
- race - The card race which is officially called type for Spell/Trap Cards (Field, Equip, Counter, etc).
##### Additional Response for Pendulum Monsters
- scale - The Pendulum Scale Value.
##### Additional Response for Link Monsters
- linkval - The Link Value of the card if it's of type "Link Monster".
- linkmarkers - The Link Markers of the card if it's of type "Link Monster". This information is returned as an array.
## Development
#### Test
```
rake spec
```
## Contributing
Fork and Pull Request to contibuting https://github.com/rokhimin/ygoprodeck .
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Ygoprodeck project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/rokhimin/ygoprodeck/blob/master/CODE_OF_CONDUCT.md).