ygodb

package
v0.0.0-...-9e96f73 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LangJA Language = "ja" // 日本語
	LangEN          = "en" // English
	LangDE          = "de" // Deutsch
	LangFR          = "fr" // Français
	LangIT          = "it" // Italiano
	LangES          = "es" // Español
	LangPT          = "pt" // Portugues
	LangKO          = "ko" // 한글
)

List of supported languages at YGO DB.

Variables

This section is empty.

Functions

func ExtractCardID

func ExtractCardID(s string) string

ExtractCardID is extract cid from link text.

func ExtractValue

func ExtractValue(s string) string

ExtractValue is extract value of number from string.

Some parameter can't be expressed as numbers. For that reason returning as strings. Example: Link Monster's deffence.

Types

type Card

type Card struct {
	ID        string
	Name      string
	Limited   string
	Attribute string
	Effect    string
	Level     string
	Link      string
	Attack    string
	Defence   string
	Text      string
}

Card is parameter set for YGO Card.

func Scraping

func Scraping(keyword string, lang Language) (Card, error)

Scraping from YGO DB.

func (Card) URL

func (c Card) URL() string

URL is card detail pages url.

type Language

type Language string

Language is supported language at YGO DB.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL