Skip to content

mrchi/v2ex-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

v2ex-go

V2EX API 2.0 Beta 的非官方 Golang 库。

文档见 V2EX › API 2.0 Beta

安装

go get github.com/mrchi/v2ex-go

API Client

创建 API Client

var client = v2ex.NewClient("<token>")

API 调用

创建新的令牌

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)

About

V2EX API 2.0 Beta 的非官方 Golang 库。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages