gopsa

package module
v0.0.0-...-0c90910 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Unlicense Imports: 10 Imported by: 0

README

gopsa

Handy wrapper for PSA card data

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Number  string `json:"CardNumber,omitempty"`
	RawName string `json:"CardName,omitempty"`
	// contains filtered or unexported fields
}

Card represents a PSA card

func (*Card) Identifier

func (c *Card) Identifier() string

Identifier returns the identifier (which is used for crafting queries)

func (*Card) Name

func (c *Card) Name() string

Name returns the name of the Card

type Set

type Set int

Set is a collection of cards, eg: `Pokemon Fossil (1st Edition)`

const (
	URLBase = "https://www.psacard.com"

	SetOriginal Set = iota
	SetFossil
	SetJungle
)

Constants

func (*Set) Identifier

func (s *Set) Identifier() (string, error)

Identifier gets the PSA set identifier for a set

func (*Set) Name

func (s *Set) Name() (string, error)

Name gets the PSA Set name for a pokemon set

type SetList

type SetList struct {
	Draw              int     `json:"draw,omitempty"`
	RecordsTotal      int     `json:"recordsTotal,omitempty"`
	RecordsFiltered   int     `json:"recordsFiltered,omitempty"`
	HasCheckListItems bool    `json:"hasCheckListItems,omitempty"`
	Data              []*Card `json:"data,omitempty"`
}

SetList holds a pokemon set card list

func GetSetList

func GetSetList(ctx context.Context, c *http.Client, s Set) (SetList, error)

GetSetList gets the cards in a given set

Jump to

Keyboard shortcuts

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