V2EX API 2.0 Beta 的非官方 Golang 库。
go get github.com/mrchi/v2ex-go
var client = v2ex.NewClient("<token>")
创建新的令牌
client.CreateToken(scope TokenScope, expiration TokenExpiration) (result createTokenResult, err error)
删除指定的提醒
client.DeleteNotification(notificationId int) (err error)
获取指定节点
client.GetNode(nodeName string) (result v2exNode, err error)
获取指定节点下的主题
client.GetNodeTopics(nodeName string, page int) (result []v2exTopic, err error)
获取最新的提醒
client.GetNotifications(page int) (result []v2exNotification, err error)
获取自己的 Profile
client.GetSelfProfile() (result v2exSelfProfile, err error)
查看当前使用的令牌
client.GetToken() (result v2exToken, err error)
获取指定主题
client.GetTopic(topicID int) (result getTopicResult, err error)
获取指定主题下的回复
client.GetTopicReplies(topicID int, page int) (result []v2exReply, err error)