leetcode

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package leetcode implements access to leetcode.com.

Index

Constants

This section is empty.

Variables

View Source
var (
	LockStr = " 🔒"
)

leetcode var

Functions

func AccountsLogin

func AccountsLogin(username, password string) (*http.Response, error)

AccountsLogin - leetcode.AccountsLogin

func AutoLogin

func AutoLogin() (*http.Response, error)

AutoLogin - leetcode.AutoLogin

func Clean

func Clean()

Clean - leetcode.Clean

func GetDescription

func GetDescription(articleSlug string) string

GetDescription - leetcode.GetDescription

func IsSolved added in v1.4.8

func IsSolved(id int) bool

IsSolved - leetcode.IsSolved

Types

type ProblemsType added in v1.4.9

type ProblemsType struct {
	UserName        string                `json:"user_name"`
	NumSolved       int                   `json:"num_solved"`
	NumTotal        int                   `json:"num_total"`
	AcEasy          int                   `json:"ac_easy"`
	AcMedium        int                   `json:"ac_medium"`
	AcHard          int                   `json:"ac_hard"`
	StatStatusPairs []StatStatusPairsType `json:"stat_status_pairs"`
	FrequencyHigh   int                   `json:"frequency_high"`
	FrequencyMid    int                   `json:"frequency_mid"`
	CategorySlug    string                `json:"category_slug"`
}

ProblemsType - leetcode.ProblemsType

func ProblemsAlgorithms

func ProblemsAlgorithms() (ps ProblemsType)

ProblemsAlgorithms - leetcode.ProblemsAlgorithms

func ProblemsAll

func ProblemsAll() (ps ProblemsType)

ProblemsAll - leetcode.ProblemsAll

func ProblemsDatabase

func ProblemsDatabase() (ps ProblemsType)

ProblemsDatabase - leetcode.ProblemsDatabase

func ProblemsShell

func ProblemsShell() (ps ProblemsType)

ProblemsShell - leetcode.ProblemsShell

type QuestionDataType added in v1.4.9

type QuestionDataType struct {
	Errors []errorType `json:"errors"`
	Data   dataType    `json:"data"`
}

QuestionDataType - leetcode.QuestionDataType

func QuestionData

func QuestionData(titleSlug string, isForce bool, graphQL ...string) (qd QuestionDataType)

QuestionData - leetcode.QuestionData

type QuestionTranslationType added in v1.4.9

type QuestionTranslationType struct {
	Errors []errorType `json:"errors"`
	Data   qtDataType  `json:"data"`
}

QuestionTranslationType - leetcode.QuestionTranslationType

func GetQuestionTranslation

func GetQuestionTranslation() (qt QuestionTranslationType)

GetQuestionTranslation - leetcode.GetQuestionTranslation

type StatStatusPairsType added in v1.4.0

type StatStatusPairsType struct {
	Stat       statType       `json:"stat"`
	Status     string         `json:"status"`
	Difficulty difficultyType `json:"difficulty"`
	PaidOnly   paidType       `json:"paid_only"`
	IsFavor    bool           `json:"is_favor"`
	Frequency  int            `json:"frequency"`
	Progress   int            `json:"progress"`
}

StatStatusPairsType - leetcode.StatStatusPairsType

func (*StatStatusPairsType) WriteRow added in v1.4.0

func (problem *StatStatusPairsType) WriteRow(buf *bytes.Buffer, path string)

WriteRow - leetcode.WriteRow

type TagType added in v1.4.0

type TagType struct {
	Name           string
	Slug           string
	TranslatedName string
}

TagType - leetcode.TagType

func GetTags

func GetTags() (tags []TagType)

GetTags - leetcode.GetTags

func (*TagType) SaveContents added in v1.4.0

func (tag *TagType) SaveContents()

SaveContents - leetcode.SaveContents

type TopicTagType added in v1.4.9

type TopicTagType struct {
	Errors []errorType `json:"errors"`
	Data   ttDataType  `json:"data"`
}

TopicTagType - leetcode.TopicTagType

func GetTopicTag

func GetTopicTag(slug string) (tt TopicTagType)

GetTopicTag - leetcode.GetTopicTag

Jump to

Keyboard shortcuts

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