translator

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	GetDecksFromInventory(string, []string) ([]dataobjects.CardDetail, error)
	GetSetDictionary(map[string]dataobjects.TransSet) (map[string]dataobjects.SetDetail, error)
}

Interface of a translator

type Struct

type Struct struct {
	// contains filtered or unexported fields
}

Struct of the translator between deckbox and scryfall

func Create

func Create(yc *dataobjects.YevaConfig) *Struct

Create a translator

func CreateWithInterface

func CreateWithInterface(db deckbox.Interface, sf scryfall.Interface, yc *dataobjects.YevaConfig) *Struct

CreateWithInterface a translator

func (*Struct) Download

func (tr *Struct) Download(cards []*dataobjects.CardDetail)

Download all the images of the cards provided

func (*Struct) FromDeckBoxToScryfall

func (tr *Struct) FromDeckBoxToScryfall(combinedDeckList []*dataobjects.CardDetail, dictionary map[string]cloudscraper.SetDetail)

FromDeckBoxToScryfall translates the set values

func (*Struct) GetDecksFromInventory

func (tr *Struct) GetDecksFromInventory(inventoryNumber string, deckNumbers []string) (combinedDeckList []*dataobjects.CardDetail, err error)

GetDecksFromInventory gets a conjoined list of card details of each card given the information from a particular inventory

Jump to

Keyboard shortcuts

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