toolkit

package
v0.0.0-...-bee203b Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CateAll     string = ""
	CateArticle string = "article"
	CateColumn  string = "column"
	CateDaily   string = "daily"
)
View Source
const (
	ItemArticle string = "article"
	ItemColumn  string = "product"
	ItemColl    string = "collection"
)
View Source
const (
	ArticleURL       = "https://time.geekbang.org/column/article/"
	ArticleColumnURL = "https://time.geekbang.org/column/intro/"
	VideoURL         = "https://time.geekbang.org/course/detail/"
	VideoColumnURL   = "https://time.geekbang.org/course/intro/"
	DailyVideoURL    = "https://time.geekbang.org/dailylesson/detail/"
	DailyCollURL     = "https://time.geekbang.org/dailylesson/collection/"
)
View Source
const (
	SearchURL = "https://time.geekbang.org/serv/v3/search"
)
View Source
const (
	SelfName string = "[Alfred-Dev-Toolkit]"
)

Variables

This section is empty.

Functions

func GeekSearchAction

func GeekSearchAction(ctx *cli.Context, al *alfred.Alfred)

func IPAction

func IPAction(ctx *cli.Context, al *alfred.Alfred)

func PingAction

func PingAction(ctx *cli.Context, al *alfred.Alfred)

func TimeAction

func TimeAction(ctx *cli.Context, al *alfred.Alfred)

func WhoAMI

func WhoAMI() string

Types

type Result

type Result struct {
	Title    string
	Subtitle string
	URL      string
}

type SearchResult

type SearchResult struct {
	Code  int              `json:"code"`
	Data  SearchResultData `json:"data"`
	Error interface{}      `json:"error"`
}

type SearchResultArticle

type SearchResultArticle struct {
	Id           int64  `json:"id"`
	Title        string `json:"title"`
	Type         string `json:"product_type"`
	Subtitle     string `json:"subtitle"`
	ColumnTitle  string `json:"product_title"`
	ColumnAuthor string `json:"product_author"`
	Digest       string `json:"content"`
	Sku          int64  `json:"product_id"`
}

type SearchResultCollection

type SearchResultCollection struct {
	Id         int64  `json:"id"`
	Title      string `json:"title"`
	Type       string `json:"product_type"`
	Subtitle   string `json:"subtitle"`
	AuthorName string `json:"author_name"`
	Digest     string `json:"content"`
}

type SearchResultColumn

type SearchResultColumn struct {
	Id          int64  `json:"id"`
	Title       string `json:"title"`
	Type        string `json:"type"`
	Subtitle    string `json:"subtitle"`
	AuthorName  string `json:"author_name"`
	AuthorIntro string `json:"author_intro"`
}

type SearchResultData

type SearchResultData struct {
	List []SearchResultItem `json:"list"`
}

type SearchResultItem

type SearchResultItem struct {
	ItemType   string                 `json:"item_type"`
	Article    SearchResultArticle    `json:"article"`
	Column     SearchResultColumn     `json:"product"`
	Collection SearchResultCollection `json:"collection"`
}

Jump to

Keyboard shortcuts

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