lingq

package
v0.0.0-...-022f309 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MaxWordStatus = 5

Variables

View Source
var WordStatusMeanings = map[int]string{
	1: "New: not learned",
	2: "Recognized: not learned but I have seen this before",
	3: "Familiar: I usually remember seeing this word and often recall its meaning, though sometimes I forget",
	4: "Learned: I know this word and almost always recognize it",
	5: "Known: I have mastered this word and can use it in a sentence",
}

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Count   int
	Next    *string
	Results []APIResult
}

type APIResult

type APIResult struct {
	Term           string
	Status         int
	ExtendedStatus *int `json:"extended_status"`
}

type Client

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

func NewClient

func NewClient(apiKey string) *Client

func (*Client) GetNonNewWords

func (c *Client) GetNonNewWords() ([]Word, error)

func (*Client) ImportLesson

func (c *Client) ImportLesson(textPath, audioPath, thumbnailPath, description, title string) error

type Word

type Word struct {
	Term   string
	Status int
}

type WordDatabase

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

func NewWordDatabase

func NewWordDatabase(path string) *WordDatabase

func (*WordDatabase) FetchIfFresh

func (wd *WordDatabase) FetchIfFresh() ([]Word, error)

func (*WordDatabase) Store

func (wd *WordDatabase) Store(words []Word) error

Jump to

Keyboard shortcuts

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