Documentation
¶
Index ¶
- type Account
- type AccountProfileImages
- type AppPixiv
- func (api *AppPixiv) IllustComments(IllustID uint64, offset int, IncludeTotalComments bool) (*IllustCommentsResponse, int, error)
- func (api *AppPixiv) IllustDetail(id uint64) (*Illust, error)
- func (api *AppPixiv) IllustFollow(restrict string, offset int) ([]Illust, int, error)
- func (api *AppPixiv) IllustRanking(Mode string, Date string, offset int) (*IllustsResponse, int, error)
- func (api *AppPixiv) IllustRecommended(contentType string, includeRankingLabel bool, maxBookmarkIDForRecommend uint64, ...) (*IllustsResponse, int, error)
- func (api *AppPixiv) IllustRelated(IllustID uint64, offset int) (*IllustsResponse, int, error)
- func (api *AppPixiv) SearchIllust(Word string, searchTarget string, sort string, startDate string, ...) (*IllustsResponse, int, error)
- func (api *AppPixiv) SearchUser(Word string, sort string, duration string, offset int) (*UserResponse, int, error)
- func (api *AppPixiv) TrendingTagsIllust() (*TrendingTagsIllustResponse, error)
- func (api *AppPixiv) UgoiraMetadata(illustID uint64) (*UgoiraMetadataResponse, error)
- func (api *AppPixiv) UserBookmarksIllust(uid uint64, restrict string, maxBookmarkID int, tag string) ([]Illust, int, error)
- func (api *AppPixiv) UserDetail(uid uint64) (*UserDetail, error)
- func (api *AppPixiv) UserIllusts(uid uint64, _type string, offset int) ([]Illust, int, error)
- type AuthInfo
- type AuthParams
- type BasePixiv
- type Illust
- type IllustComments
- type IllustCommentsParams
- type IllustCommentsResponse
- type IllustRankingParams
- type IllustRecommendedParams
- type IllustRelatedParams
- type IllustResponse
- type IllustsResponse
- type Images
- type LoginError
- type LoginResponse
- type MetaPage
- type MetaSinglePage
- type ParentComment
- type Perror
- type PixivError
- type PixivResponseError
- type SearchIllustParams
- type SearchUserParams
- type Tag
- type TrendingTagsIllust
- type TrendingTagsIllustParams
- type TrendingTagsIllustResponse
- type UgoiraMetadata
- type UgoiraMetadataFrame
- type UgoiraMetadataParams
- type UgoiraMetadataResponse
- type UgoiraMetadataZipUrls
- type User
- type UserDetail
- type UserImages
- type UserMessageDetail
- type UserPreviews
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
ID string `json:"id"`
Name string `json:"name"`
Account string `json:"account"`
MailAddress string `json:"mail_address"`
IsPremium bool `json:"is_premium"`
XRestrict int `json:"x_restrict"`
IsMailAuthorized bool `json:"is_mail_authorized"`
ProfileImage AccountProfileImages `json:"profile_image_urls"`
}
Account struct
type AccountProfileImages ¶
type AccountProfileImages struct {
Px16 string `json:"px_16x16"`
Px50 string `json:"px_50x50"`
Px170 string `json:"px_170x170"`
}
AccountProfileImages struct
type AppPixiv ¶
type AppPixiv struct {
BaseAPI *BasePixiv
// contains filtered or unexported fields
}
AppPixiv AppPixivAPI
func (*AppPixiv) IllustComments ¶
func (api *AppPixiv) IllustComments(IllustID uint64, offset int, IncludeTotalComments bool) (*IllustCommentsResponse, int, error)
IllustComments get the comments of an Illust
func (*AppPixiv) IllustDetail ¶
IllustDetail gets the detail of an illust
func (*AppPixiv) IllustFollow ¶
IllustFollow restrict: [public, private]
func (*AppPixiv) IllustRanking ¶
func (api *AppPixiv) IllustRanking(Mode string, Date string, offset int) (*IllustsResponse, int, error)
IllustRanking ("day", "", 0)
func (*AppPixiv) IllustRecommended ¶
func (api *AppPixiv) IllustRecommended(contentType string, includeRankingLabel bool, maxBookmarkIDForRecommend uint64, minBookmarkIDForRecentIllust uint64, offset int, includeRankingIllusts bool, reqAuth bool) (*IllustsResponse, int, error)
IllustRecommended ("illust", true, 0, 0, 0, true, true)
func (*AppPixiv) IllustRelated ¶
IllustRelated get the related illusts of an Illust
func (*AppPixiv) SearchIllust ¶
func (api *AppPixiv) SearchIllust(Word string, searchTarget string, sort string, startDate string, endDate string, duration string, offset int) (*IllustsResponse, int, error)
SearchIllust ("Sagiri", "partial_match_for_tags", "date_desc", "", "", "", 0)
func (*AppPixiv) SearchUser ¶
func (api *AppPixiv) SearchUser(Word string, sort string, duration string, offset int) (*UserResponse, int, error)
SearchUser ("Quan_", "date_desc", "", 0)
func (*AppPixiv) TrendingTagsIllust ¶
func (api *AppPixiv) TrendingTagsIllust() (*TrendingTagsIllustResponse, error)
TrendingTagsIllust ("day", "", 0)
func (*AppPixiv) UgoiraMetadata ¶
func (api *AppPixiv) UgoiraMetadata(illustID uint64) (*UgoiraMetadataResponse, error)
UgoiraMetadata ("day", "", 0)
func (*AppPixiv) UserBookmarksIllust ¶
func (api *AppPixiv) UserBookmarksIllust(uid uint64, restrict string, maxBookmarkID int, tag string) ([]Illust, int, error)
UserBookmarksIllust restrict: [public, private]
func (*AppPixiv) UserDetail ¶
func (api *AppPixiv) UserDetail(uid uint64) (*UserDetail, error)
UserDetail gets users information
type AuthParams ¶
type AuthParams struct {
GetSecureURL int `url:"get_secure_url,omitempty"`
ClientID string `url:"client_id,omitempty"`
ClientSecret string `url:"client_secret,omitempty"`
GrantType string `url:"grant_type,omitempty"`
Username string `url:"username,omitempty"`
Password string `url:"password,omitempty"`
RefreshToken string `url:"refresh_token,omitempty"`
}
type BasePixiv ¶
type BasePixiv struct {
AccessToken string
UserID string
RefreshToken string
TokenDeadline time.Time
AccessChangeHook func(string)
// contains filtered or unexported fields
}
BasePixiv struct
func BasePixivAPI ¶
func BasePixivAPI() *BasePixiv
BasePixivAPI is basic tools which will be called by others
func (*BasePixiv) Auth ¶
func (api *BasePixiv) Auth(params *AuthParams) (*AuthInfo, error)
Auth requires authParams
func (*BasePixiv) HookAccessToken ¶
HookAccessToken call a function when the AccessToken changed
type Illust ¶
type Illust struct {
ID uint64 `json:"id"`
Title string `json:"title"`
Type string `json:"type"`
Images Images `json:"image_urls"`
Caption string `json:"caption"`
Restrict int `json:"restrict"`
User User `json:"user"`
Tags []Tag `json:"tags"`
Tools []string `json:"tools"`
CreateData string `json:"create_data"`
PageCount int `json:"page_count"`
Width int `json:"width"`
Height int `json:"height"`
SanityLevel int `json:"sanity_level"`
// TODO:
// Series `json:"series"`
MetaSinglePage MetaSinglePage `json:"meta_single_page"`
MetaPages []MetaPage `json:"meta_pages"`
TotalView int `json:"total_view"`
TotalBookmarks int `json:"total_bookmarks"`
IsBookmarked bool `json:"is_bookmarked"`
Visible bool `json:"visible"`
IsMuted bool `json:"is_muted"`
TotalComments int `json:"total_comments"`
}
type IllustComments ¶
type IllustCommentsParams ¶
type IllustCommentsParams struct {
IllustID uint64 `url:"illust_id,omitemtpy"`
Offset int `url:"offset,omitempty"`
IncludeTotalComments bool `url:"include_total_comments,omitempty"`
}
IllustCommentsParams is used by function IllustComments
type IllustCommentsResponse ¶
type IllustCommentsResponse struct {
TotalComments int `json:"total_comments"`
Comments []IllustComments `json:"comments"`
NextURL string `json:"next_url"`
}
type IllustRankingParams ¶
type IllustRankingParams struct {
Mode string `url:"mode,omitemtpy"`
Date string `url:"date,omitempty"`
Filter string `url:"filter,omitempty"`
Offset int `url:"offset,omitempty"`
}
IllustRankingParams IllustRanking
type IllustRecommendedParams ¶
type IllustRecommendedParams struct {
ContentType string `url:"content_type,omitemtpy"`
Filter string `url:"filter,omitempty"`
MaxBookmarkIDForRecommend uint64 `url:"max_bookmark_id_for_recommend,omitempty"`
MinBookmarkIDForRecentIllust uint64 `url:"min_bookmark_id_for_recent_illust,omitempty"`
Offset int `url:"offset,omitempty"`
IncludeRankingIllusts bool `url:"include_ranking_illusts,omitempty"`
// contains filtered or unexported fields
}
IllustRecommendedParams IllustRecommended
type IllustRelatedParams ¶
type IllustResponse ¶
type IllustResponse struct {
Illust Illust `json:"illust"`
}
type IllustsResponse ¶
type LoginError ¶
type LoginResponse ¶
type LoginResponse struct {
Response *AuthInfo `json:"response"`
}
type MetaSinglePage ¶
type MetaSinglePage struct {
OriginalImageURL string `json:"original_image_url"`
}
type ParentComment ¶
type ParentComment struct {
}
type PixivError ¶
type PixivError struct {
Message string `json:"message"`
Reason string `json:"reason"`
UserMessage string `json:"user_message"`
UserMessageDetails UserMessageDetail `json:"user_message_details"`
}
type PixivResponseError ¶
type PixivResponseError struct {
Error PixivError `json:"error"`
}
PixivResponseError PixivResponseError
type SearchIllustParams ¶
type SearchIllustParams struct {
Word string `url:"word,omitempty"`
SearchTarget string `url:"search_target,omitempty"`
Sort string `url:"sort,omitempty"`
StartDate string `url:"start_date,omitempty"`
EndDate string `url:"end_date,omitempty"`
Duration string `url:"duration,omitempty"`
Offset int `url:"offset,omitempty"`
Filter string `url:"filter,omitempty"`
}
type SearchUserParams ¶
type TrendingTagsIllust ¶
type TrendingTagsIllustParams ¶
type TrendingTagsIllustParams struct {
Filter string `url:"filter,omitempty"`
}
TrendingTagsIllustParams TrendingTagsIllust
type TrendingTagsIllustResponse ¶
type TrendingTagsIllustResponse struct {
TrendTags []TrendingTagsIllust `json:"trend_tags"`
}
type UgoiraMetadata ¶
type UgoiraMetadata struct {
Frames []UgoiraMetadataFrame `json:"frames"`
ZipUrls UgoiraMetadataZipUrls `json:"zip_urls"`
}
type UgoiraMetadataFrame ¶
type UgoiraMetadataParams ¶
type UgoiraMetadataParams struct {
IllustID uint64 `url:"illust_id,omitempty"`
}
type UgoiraMetadataResponse ¶
type UgoiraMetadataResponse struct {
UgoiraMetadata UgoiraMetadata `json:"ugoira_metadata"`
}
type UgoiraMetadataZipUrls ¶
type UserDetail ¶
type UserDetail struct {
User *User `json:"user"`
}
type UserImages ¶
type UserImages struct {
Medium string `json:"medium"`
}
type UserMessageDetail ¶
type UserMessageDetail struct {
}
type UserPreviews ¶
type UserResponse ¶
type UserResponse struct {
UserPreviews []UserPreviews `json:"user_previews"`
NextURL string `json:"next_url"`
}