pixiv-scrapper/pixiv/types.go

84 lines
2.5 KiB
Go

package pixiv
//Illust .
type Illust struct {
complited bool
ID string `json:"id"`
IlustID string `json:"illustId"`
Title string `json:"title"`
IllustTitle string `json:"illustTitle"`
IllustComment string `json:"illustComment"`
IllustType int `json:"illustType"`
XRestrict int `json:"xRestrict"`
Sl int `json:"sl"`
URL string `json:"url"`
Pages []IllustPage
URLs struct {
Mini string `json:"mini"`
Thumb string `json:"thumb"`
Small string `json:"small"`
Regular string `json:"regular"`
Original string `json:"original"`
} `json:"urls"`
Description string `json:"description"`
Tags struct {
AuthorID string `json:"authorId"`
IsLocked bool `json:"isLocked"`
Tags []IllustTag `json:"tags"`
Writable bool `json:"writable"`
} `json:"tags,omitempty"`
UserID string `json:"userId"`
UserName string `json:"userName"`
UserAccount string `json:"userAccount"`
Width int `json:"width"`
Height int `json:"height"`
PageCount int `json:"pageCount"`
IsBookmarkable bool `json:"isBookmarkable"`
Alt string `json:"alt"`
IsAdContainer bool `json:"isAdContainer"`
TitleCaptionTranslation struct {
WorkTitle string `json:"workTitle"`
WorkCaption string `json:"workCaption"`
} `json:"titleCaptionTranslation"`
CreateDate string `json:"createDate"`
UpdateDate string `json:"updateDate"`
IsUnlisted bool `json:"isUnlisted"`
ProfileImageURL string `json:"profileImageUrl"`
}
//IllustTag .
type IllustTag struct {
Tag string `json:"tag"`
Locked bool `json:"locked"`
Deletable bool `json:"deletable"`
UserID string `json:"userId"`
UserName string `json:"userName"`
Romaji string `json:"romaji"`
Translation struct {
En string `json:"en"`
} `json:"translation"`
}
//IllustPage .
type IllustPage struct {
URLs struct {
Mini string `json:"mini"`
Thumb string `json:"thumb"`
Small string `json:"small"`
Regular string `json:"regular"`
Original string `json:"original"`
} `json:"urls"`
Width int `json:"width"`
Height int `json:"height"`
}
//User .
type User struct {
UserID string `json:"userId"`
UserName string `json:"userName"`
ProfileImageURL string `json:"profileImageUrl"`
Following bool `json:"following"`
Followed bool `json:"followed"`
illusts []Illust
}