pixiv/novel_test.go

48 lines
913 B
Go

// test
package pixiv
import (
"fmt"
"testing"
)
// 2024年2月19日14:06:04
// efO864tOWGoWGkG2001hFcXb3a_2lWBVbmA8V-Jx0lA
func TestPixiv(t *testing.T) {
app := NewApp()
app.SetRefresh_Token("JMfu2g_lzwHS7ojLnUA3mifsBRPQLgbfqQLZ9W1M73E")
// app.GetAccess_Token()
// fmt.Println(app.PrintAccess_Token())
// return
app.SetAccess_Token("efO864tOWGoWGkG2001hFcXb3a_2lWBVbmA8V-Jx0lA")
// fmt.Println(app.GetUserInfo("62508240"))
// info, err, code := app.GetUserNovel("9114206")
// if err != nil {
// fmt.Println(code, err)
// return
// }
// fmt.Println(info.Novels)
// err := app.GetAccess_Token()
// if err != nil {
// fmt.Println("获取token失败", err)
// return
// }
list, err, code := app.GetNovelSeries("10628953")
if err != nil {
fmt.Println("获取系列失败", code, err)
return
}
for _, value := range list.Novels {
fmt.Println(value.Title, value.Tags)
}
}