card

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallCardData

func CallCardData(url string) ([]byte, error)

func CardCommand

func CardCommand() (string, error)

func CardImage

func CardImage(imageURL string) (string, error)

Types

type CardsModel

type CardsModel struct {
	Choice         string
	IllustratorMap map[string]string
	ImageMap       map[string]string
	PriceMap       map[string]string
	Quitting       bool
	SelectedOption string
	SeriesName     string
	Table          table.Model
	ViewImage      bool
}

func CardsList

func CardsList(setID string) (CardsModel, error)

CardsList creates and returns a new CardsModel with cards from a specific set

func (CardsModel) Init

func (m CardsModel) Init() tea.Cmd

func (CardsModel) Update

func (m CardsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (CardsModel) View

func (m CardsModel) View() string

type ImageModel

type ImageModel struct {
	CardName  string
	ImageURL  string
	Error     error
	Loading   bool
	Spinner   spinner.Model
	ImageData string
}

func ImageRenderer

func ImageRenderer(cardName string, imageURL string) ImageModel

func (ImageModel) Init

func (m ImageModel) Init() tea.Cmd

func (ImageModel) Update

func (m ImageModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (ImageModel) View

func (m ImageModel) View() string

type SeriesModel

type SeriesModel struct {
	List     list.Model
	Choice   string
	SeriesID string
	Quitting bool
}

func SeriesList

func SeriesList() SeriesModel

func (SeriesModel) Init

func (m SeriesModel) Init() tea.Cmd

func (SeriesModel) Update

func (m SeriesModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SeriesModel) View

func (m SeriesModel) View() string

type SetsModel

type SetsModel struct {
	List       list.Model
	Choice     string
	SetID      string
	Quitting   bool
	SeriesName string
	// contains filtered or unexported fields
}

func SetsList

func SetsList(seriesID string) (SetsModel, error)

func (SetsModel) Init

func (m SetsModel) Init() tea.Cmd

func (SetsModel) Update

func (m SetsModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SetsModel) View

func (m SetsModel) View() string

Jump to

Keyboard shortcuts

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