gamer

package
v0.0.0-...-1004ae7 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SingleTest

func SingleTest(url string)

測試用function

Types

type Floor

type Floor struct {
	Num      int    // 樓層數
	UserName string // 用戶名稱
	UserID   string // 用戶帳號
	Content  string // 樓層主體
}

func (*Floor) GetContent

func (f *Floor) GetContent() string

func (*Floor) GetNum

func (f *Floor) GetNum() int

func (*Floor) GetuserID

func (f *Floor) GetuserID() string

func (*Floor) GetuserName

func (f *Floor) GetuserName() string

func (*Floor) SetInfo

func (f *Floor) SetInfo(num int, name string, id string)

func (*Floor) Setcontent

func (f *Floor) Setcontent(content string)

type FloorSet

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

func FindAllFloor

func FindAllFloor(baseurl, userID string) (FloorSet, error)

輸入用戶ID與想要爬取的討論串, 就會將所有結果放進FloorSet並且回傳

func FindAllFloorInfo

func FindAllFloorInfo(baseurl string) (FloorSet, error)

func FindAuthorFloor

func FindAuthorFloor(baseurl, userID string) (FloorSet, error)

只找使用者在討論串的樓(無法獲得實際在討論串樓層數)

func (*FloorSet) AddFloors

func (Fs *FloorSet) AddFloors(f []Floor)

func (*FloorSet) GetFloors

func (Fs *FloorSet) GetFloors() []Floor

func (*FloorSet) GetOneFloor

func (Fs *FloorSet) GetOneFloor(index int) Floor

func (*FloorSet) GetTotal

func (Fs *FloorSet) GetTotal() int

func (*FloorSet) Result

func (Fs *FloorSet) Result()

func (*FloorSet) SortResult

func (Fs *FloorSet) SortResult()

type Post

type Post struct {
	SubBsn    string   // 子版分類
	SummaryGP int      // 文章總獲得GP數目
	Href      string   // 文章超連結
	Title     string   // 文章標題
	Author    UserInfo // 作者資料
}

type Posts

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

func Intersection

func Intersection(p1, p2 Posts) Posts

多條件查詢的時候取交集

func SearchSpecifideTitle

func SearchSpecifideTitle(baseurl, key string) (Posts, error)

根據標題找文章

func (*Posts) AppendPostSet

func (Ps *Posts) AppendPostSet(p []Post)

將post的子集合新增到Posts裡面

func (Posts) GetResult

func (Ps Posts) GetResult() []Post

func (Posts) Result

func (Ps Posts) Result()

type UserInfo

type UserInfo struct {
	UserID     string // 帳號ID
	UserName   string // 帳號名稱
	Title      string // 稱號
	Level      int    // 等級
	Race       string // 種族
	Occupation string // 職業
	Balance    int    // 巴幣
	GP         int    // GP
}

func FindUserInfo

func FindUserInfo(UserID string) (UserInfo, error)

獲得單一用戶的帳號資訊

Jump to

Keyboard shortcuts

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