Documentation
¶
Overview ¶
Package tycs is the library behind the tycs CLI.
Index ¶
Constants ¶
View Source
const BaseURL = "https://" + Host
BaseURL is the root every request is built from.
View Source
const DefaultUserAgent = "tycs-cli/dev (+https://github.com/tamnd/tycs-cli)"
View Source
const Host = "teachyourselfcs.com"
Host is the site this client talks to.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client fetches data from teachyourselfcs.com.
type Config ¶
type Config struct {
BaseURL string
Rate time.Duration
Timeout time.Duration
Retries int
UserAgent string
}
Config holds per-client settings.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns a Config pointed at teachyourselfcs.com.
type Domain ¶
type Domain struct{}
Domain is the tycs driver for the kit host (ant).
func (Domain) Info ¶
func (Domain) Info() kit.DomainInfo
type Subject ¶
type Subject struct {
Rank int `json:"rank" csv:"rank" tsv:"rank"`
Slug string `json:"slug" csv:"slug" tsv:"slug" kit:"id"`
Title string `json:"title" csv:"title" tsv:"title"`
URL string `json:"url" csv:"url" tsv:"url"`
BookURL string `json:"book_url" csv:"book_url" tsv:"book_url"`
}
Subject is one CS topic from the Teach Yourself CS curriculum.
Click to show internal directories.
Click to hide internal directories.