Files
inp2025/plays/base.go
2025-09-10 09:56:06 +08:00

31 lines
401 B
Go

package plays
import (
"time"
tea "github.com/charmbracelet/bubbletea"
"github.com/go-resty/resty/v2"
)
const (
tick = 100 * time.Millisecond
)
type TickMsg time.Time
func Tick() tea.Cmd {
return tea.Tick(tick, func(t time.Time) tea.Msg {
return TickMsg(t)
})
}
type Base struct {
client *resty.Client
}
func NewBase(client *resty.Client) *Base {
return &Base{
client: client,
}
}