pixiv/struct.go

48 lines
1.5 KiB
Go

// struct
package pixiv
// 小说列表
type NovelList struct {
ID string `json:"id"` // 小说id
Title string `json:"title"` // 小说标题
Length string `json:"length"` // 小说字数
Caption string `json:"caption"` // 小说简介
Date string `json:"date"` // 发布时间
Tags []string `json:"tags"` // 标签
}
// 用户小说
type UserNovel struct {
Novels []NovelList `json:"novels"` //小说列表
User UserInfo `json:"user"` //用户信息
}
// 系列信息
type Series struct {
Title string `json:"title"` //系列标题
Caption string `json:"caption"` //系列简介
ContentCount int64 `json:"content_count"` //系列小说数量
Novels []NovelList `json:"novels"` //小说列表
User UserInfo `json:"user"` //用户信息
}
// 用户信息
type UserInfo struct {
UserId int64 `json:"id"` //用户id
UserName string `json:"name"` //用户名
Caption string `json:"caption"` //用户简介
Account string `json:"account"` //账户名
TotalNovels int64 `json:"total_novels"` //用户小说数量
}
// 单篇小说信息
type NovelInfo struct {
User UserInfo `json:"user"` //用户信息
ID string `json:"id"` // 小说id
Title string `json:"title"` // 小说标题
Length string `json:"length"` // 小说字数
Caption string `json:"caption"` // 小说简介
Date string `json:"date"` // 发布时间
}