tieba

package
v0.0.0-...-c631dff Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UrlTiebaUserProfile  = "http://c.tieba.baidu.com/c/u/user/profile"
	UrlTiebaHomeGetPanel = "http://tieba.baidu.com/home/get/panel"
)

Functions

func GetTbs

func GetTbs(bduss string) (tbs string, err error)

GetTbs 通过 百度BDUSS 获取贴吧TBS

func GetTiebaFid

func GetTiebaFid(tiebaName string) (fid string, err error)

GetTiebaFid 获取贴吧fid值

func IsTiebaExist

func IsTiebaExist(tiebaName string) bool

IsTiebaExist 检测贴吧是否存在

Types

type Bar

type Bar struct {
	FID   string // 贴吧fid
	Name  string // 名字
	Level string // 个人等级
	Exp   int    // 个人经验
}

Bar 贴吧详情

func GetBars

func GetBars(uid uint64) ([]*Bar, error)

GetBars 通过 百度uid 获取贴吧列表

type Stat

type Stat struct {
	LikeForumNum int // 关注的贴吧数
	PostNum      int // 发言次数
}

Stat 统计数据

type Tieba

type Tieba struct {
	Baidu *baidu.Baidu
	Tbs   string
	Stat  *Stat
	Bars  []*Bar //要执行任务的贴吧列表
}

Tieba 百度贴吧账号详细情况

func NewUserInfoByBDUSS

func NewUserInfoByBDUSS(bduss string) (*Tieba, error)

NewUserInfoByBDUSS 检测BDUSS有效性, 同时获取百度详细信息

func NewUserInfoByName

func NewUserInfoByName(name string) (t *Tieba, err error)

NewUserInfoByName 提供 name (百度用户名) 获取百度帐号个人详细信息

func NewUserInfoByUID

func NewUserInfoByUID(uid uint64) (t *Tieba, err error)

NewUserInfoByUID 提供 UID 获取百度帐号详细信息

func (*Tieba) DoTiebaSign

func (user *Tieba) DoTiebaSign(fid, name string) (status int, bonusExp int, err error)

DoTiebaSign 执行贴吧签到

func (*Tieba) FlushUserInfo

func (t *Tieba) FlushUserInfo() (err error)

FlushUserInfo 刷新百度帐号个人详细信息

func (*Tieba) GetBars

func (t *Tieba) GetBars() error

GetBars 获取贴吧列表

func (*Tieba) GetTbs

func (t *Tieba) GetTbs() error

GetTbs 获取贴吧TBS

func (*Tieba) TiebaSign

func (user *Tieba) TiebaSign(fid, name string) (errorCode, errorMsg string, bonusExp int, err error)

TiebaSign 贴吧签到

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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