Documentation ¶
Index ¶
- Constants
- func CheckAssignments(args []string)
- func CheckSubscription() bool
- func GetLatestReset() time.Time
- func GetLevelPercentage() (int, int)
- func GetUserLevel() int
- func GetWaniKaniData(resource string) []byte
- func InitialConfig()
- func LoadConfig()
- func LoadLevelSubject(level int) *[]SubjectData
- func SetConfig(key, value string)
- func ThrowError(message string, err error)
- func UpdateResetCache()
- func UpdateSubjectsCache()
- type Assignment
- type AssignmentCollection
- type AuxiliaryMeanings
- type CharacterImage
- type ContextSentences
- type Meanings
- type Readings
- type ResetData
- type ResetObj
- type ReviewCollection
- type ReviewData
- type SubjectCollection
- type SubjectData
- type UserData
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CheckAssignments ¶
func CheckAssignments(args []string)
func CheckSubscription ¶
func CheckSubscription() bool
func GetLatestReset ¶
func GetLevelPercentage ¶
func GetUserLevel ¶
func GetUserLevel() int
func GetWaniKaniData ¶
first argument should be 'resource'. Second arg should be 'optional_arg' have to use a variadic argument to support the optional second argument
func InitialConfig ¶
func InitialConfig()
func LoadConfig ¶
func LoadConfig()
func LoadLevelSubject ¶
func LoadLevelSubject(level int) *[]SubjectData
func ThrowError ¶
func UpdateResetCache ¶
func UpdateResetCache()
func UpdateSubjectsCache ¶
func UpdateSubjectsCache()
Types ¶
type Assignment ¶
type Assignment struct { Id int `json:"id"` URL string `json:"url"` Data struct { SubjectID int `json:"subject_id"` SubjectType string `json:"subject_type"` SRSStage int `json:"srs_stage"` SRSStageName string `json:"srs_stage_name"` UnlockedAt string `json:"unlocked_at"` StartedAt string `json:"started_at"` PassedAt string `json:"passed_at"` BurnedAt string `json:"burned_at"` AvailableAt string `json:"available_at"` ResurrectedAt string `json:"resurrected_at"` Passed bool `json:"passed"` Resurrected bool `json:"resurrected"` Hidden bool `json:"hidden"` } `json:"data"` }
type AssignmentCollection ¶
type AssignmentCollection struct { Pages struct { PerPage int `json:"per_page"` NextURL string `json:"next_url"` } `json:"pages"` TotalCount int `json:"total_count"` Assignments []Assignment `json:"data"` }
type AuxiliaryMeanings ¶
type CharacterImage ¶
type ContextSentences ¶
type ReviewCollection ¶
type ReviewCollection struct { Url string `json:"url"` TotalCount string `json:"total_count"` Reviews []ReviewData `json:"data"` Pages struct { NextURL string `json:"next_url"` } `json:"pages"` }
type ReviewData ¶
type ReviewData struct { Id int `json:"id"` Object string `json:"object"` Data struct { SubjectId int `json:"subject_id"` SubjectType string `json:"subject_type"` MeaningCorrect int `json:"meaning_correct"` MeaningIncorrect int `json:"meaning_incorrect"` MeaningMaxStreak int `json:"meaning_max_streak"` MeaningCurrentStreak int `json:"meaning_current_streak"` ReadingCorrect int `json:"reading_correct"` ReadingIncorrect int `json:"reading_incorrect"` ReadingMaxStreak int `json:"reading_max_streak"` ReadingCurrentStreak int `json:"reading_current_streak"` PercentageCorrect int `json:"percentage_correct"` Hidden bool `json:"hidden"` } `json:"data"` }
type SubjectCollection ¶
type SubjectCollection struct { Url string `json:"url"` Pages struct { NextURL string `json:"next_url"` } `json:"pages"` Subjects []SubjectData `json:"data"` }
type SubjectData ¶
type SubjectData struct { Id int `json:"id"` Object string `json:"object"` Data struct { AmalgamationSubjectIds []int `json:"amalgamation_subject_ids"` AuxiliaryMeanings []AuxiliaryMeanings `json:"auxiliary_meanings"` Characters string `json:"characters"` CharacterImages []CharacterImage `json:"character_images"` ContextSentences []ContextSentences `json:"context_sentences"` DocumentURL string `json:"document_url"` HiddenAt string `json:"hidden_at"` LessonPosition int `json:"lesson_position"` Level int `json:"level"` Meanings []Meanings `json:"meanings"` MeaningMnemonic string `json:"meaning_mnemonic"` MeaningHint string `json:"meaning_hint"` Readings []Readings `json:"readings"` ReadingMnemonic string `json:"reading_mnemonic"` ReadingHint string `json:"reading_hint"` PartsOfSpeech []string `json:"parts_of_speech"` Slug string `json:"slug"` } `json:"data"` }
type UserData ¶
type UserData struct { Data struct { Username string `json:"username"` Level int `json:"level"` MaxLevelGrantedBySubscription int `json:"max_level_granted_by_subscription"` Subscribed bool `json:"subscribed"` Subscription struct { Active bool `json:"active"` Type string `json:"type"` MaxLevelGranted string `json:"max_level_granted"` PeriodEndsAt string `json:"period_ends_at"` } `json:"subscription"` } `json:"data"` }
Click to show internal directories.
Click to hide internal directories.