tieba

package
v0.0.0-...-548fb8d Latest Latest
Warning

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

Go to latest
Published: May 20, 2016 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forum

type Forum struct {
	ForumId  int32  `json:"forum_id"`
	IsLike   int32  `json:"is_like"`
	FavoType int32  `json:"favo_type"`
	Name     string `json:"name"`
	LevelId  string `json:"level_id"`
}

type LikedResult

type LikedResult struct {
	Result
	Anti struct {
		Tbs string `json:"tbs"`
	} `json:"anti"`
	ForumList []Forum `json:"forum_list"`
	Page      struct {
		PageSize    string `json:"page_size"`
		Offset      int32  `json:"offset"`
		CurrentPage int32  `json:"current_page"`
		TotalCount  int32  `json:"total_count"`
		TotalPage   int32  `json:"total_page"`
		HasMore     int32  `json:"has_more"`
		HasPrev     int32  `json:"has_prev"`
	} `json:"page"`
}

type LoginResult

type LoginResult struct {
	Result
	Anti struct {
		NeedVcode   int32  `json:"need_vcode"`
		VcodeMd5    string `json:"vcode_md5"`
		VcodePicUrl string `json:"vcode_pic_url"`
		Tbs         string `json:"tbs"`
	} `json:"anti"`
	User struct {
		Id       string `json:"id"`
		Name     string `json:"name"`
		BDUSS    string `json:"BDUSS"`
		Passwd   string `json:"passwd"`
		Portrait string `json:"portrait"`
	} `json:"user"`
}

type Result

type Result struct {
	ErrorCode int32  `json:"error_code"`
	ErrorMsg  string `json:"error_msg"`
	Time      int32  `json:"time"`
	Ctime     int32  `json:"ctime"`
	Logid     int32  `json:"logid"`
}

type SignResult

type SignResult struct {
	ErrorCode int32  `json:"error_code"`
	ErrorMsg  string `json:"error_msg"`
	Time      int32  `json:"time"`
	Ctime     int32  `json:"ctime"`
	Logid     int32  `json:"logid"`
}

type TbsResult

type TbsResult struct {
	Tbs     string `json:"tbs"`
	IsLogin int32  `json:"is_login"`
}

type Tieba

type Tieba struct {
	Uid      uint32
	Username string
	Password string
	BDUSS    string
	// 瞬态
	Liked []Forum

	VcodeHandler func(img image.Image) (vcode string)
	// contains filtered or unexported fields
}

func NewTieba

func NewTieba(username, password string) (this *Tieba)

func (*Tieba) GetFid

func (this *Tieba) GetFid(kw string) (fid string)

获取贴吧fid

func (*Tieba) GetLiked

func (this *Tieba) GetLiked() (list []Forum)

获取喜欢的贴吧

func (*Tieba) GetTbs

func (this *Tieba) GetTbs() (tbs string)

检查登录是否有效

func (*Tieba) Login

func (this *Tieba) Login() (err error)

func (*Tieba) Sign

func (this *Tieba) Sign(kw string) (result *Result, err error)

func (*Tieba) SignAll

func (this *Tieba) SignAll()

Jump to

Keyboard shortcuts

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