Documentation ¶
Index ¶
- Constants
- func ProxyImage(URL string, target string) string
- type Comment
- type FrequentTag
- type Illust
- type IllustShort
- type Image
- type ImageResponse
- type LandingArtworks
- type LandingRecommendByTags
- type PaginationData
- type PixivResponse
- type Pixivision
- type RankedArtwork
- type RankingResponse
- type SearchArtworks
- type SearchResult
- type Tag
- type TagDetail
- type TagResponse
- type User
- type UserShort
Constants ¶
View Source
const ( Safe xRestrict = 0 R18 xRestrict = 1 R18G xRestrict = 2 )
View Source
const ( Unrated aiType = 0 NotAI aiType = 1 AI aiType = 2 )
Variables ¶
This section is empty.
Functions ¶
func ProxyImage ¶
Types ¶
type Comment ¶
type Comment struct { AuthorID string `json:"userId"` AuthorName string `json:"userName"` Avatar string `json:"img"` Context string `json:"comment"` Stamp string `json:"stampId"` Date string `json:"commentDate"` }
func ProxyCommentsSlice ¶
type FrequentTag ¶
type Illust ¶
type Illust struct { ID string `json:"id"` Title string `json:"title"` Description template.HTML `json:"description"` UserID string `json:"userId"` UserName string `json:"userName"` UserAccount string `json:"userAccount"` Date time.Time `json:"uploadDate"` Images []Image `json:"images"` Tags []Tag `json:"tags"` Pages int `json:"pageCount"` Bookmarks int `json:"bookmarkCount"` Likes int `json:"likeCount"` Comments int `json:"commentCount"` Views int `json:"viewCount"` CommentDisabled int `json:"commentOff"` SanityLevel int `json:"sl"` XRestrict xRestrict `json:"xRestrict"` AiType aiType `json:"aiType"` User UserShort RecentWorks []IllustShort RelatedWorks []IllustShort CommentsList []Comment IsUgoira bool }
func (*Illust) ProxyImages ¶
type IllustShort ¶
type IllustShort struct { ID string `json:"id"` Title string `json:"title"` Description template.HTML `json:"description"` ArtistID string `json:"userId"` ArtistName string `json:"userName"` ArtistAvatar string `json:"profileImageUrl"` Date time.Time `json:"uploadDate"` Thumbnail string `json:"url"` Pages int `json:"pageCount"` XRestrict xRestrict `json:"xRestrict"` AiType aiType `json:"aiType"` }
func ProxyShortArtworkSlice ¶
func ProxyShortArtworkSlice(artworks []IllustShort, proxy string) []IllustShort
type Image ¶
type Image struct { Small string `json:"thumb_mini"` Medium string `json:"small"` Large string `json:"regular"` Original string `json:"original"` }
Pixiv gives us 5 types of an image. I don't need the mini one tho. PS: Where tf is my 360x360 image, Pixiv?
type ImageResponse ¶
type LandingArtworks ¶
type LandingArtworks struct { Commissions []IllustShort Following []IllustShort Recommended []IllustShort Newest []IllustShort Rankings []IllustShort Users []IllustShort Pixivision []Pixivision RecommendByTags []LandingRecommendByTags }
type LandingRecommendByTags ¶
type LandingRecommendByTags struct { Name string `json:"tag"` Artworks []IllustShort }
func ProxyRecommendedByTagsSlice ¶
func ProxyRecommendedByTagsSlice(artworks []LandingRecommendByTags, proxy string) []LandingRecommendByTags
type PaginationData ¶
type PixivResponse ¶
type PixivResponse struct { Error bool Message string Body json.RawMessage }
type Pixivision ¶
type Pixivision struct { ID string `json:"id"` Title string `json:"title"` Thumbnail string `json:"thumbnailUrl"` URL string `json:"url"` }
func ProxyPixivisionSlice ¶
func ProxyPixivisionSlice(articles []Pixivision, proxy string) []Pixivision
type RankedArtwork ¶
type RankedArtwork struct { ID int `json:"illust_id"` Title string `json:"title"` Rank int `json:"rank"` Pages string `json:"illust_page_count"` Image string `json:"url"` ArtistID int `json:"user_id"` ArtistName string `json:"user_name"` ArtistAvatar string `json:"profile_img"` }
func ProxyRankedArtworkSlice ¶
func ProxyRankedArtworkSlice(artworks []RankedArtwork, proxy string) []RankedArtwork
type RankingResponse ¶
type RankingResponse struct { Artworks []RankedArtwork `json:"contents"` Mode string `json:"mode"` Content string `json:"content"` CurrentDate string `json:"date"` PrevDateRaw json.RawMessage `json:"prev_date"` NextDateRaw json.RawMessage `json:"next_date"` PrevDate string NextDate string }
func (*RankingResponse) ProxyImages ¶
func (s *RankingResponse) ProxyImages(proxy string)
type SearchArtworks ¶
type SearchArtworks struct { Artworks []IllustShort `json:"data"` Total int `json:"total"` }
type SearchResult ¶
type SearchResult struct { Artworks SearchArtworks Popular struct { Permanent []IllustShort `json:"permanent"` Recent []IllustShort `json:"recent"` } `json:"popular"` RelatedTags []string `json:"relatedTags"` }
func (*SearchResult) ProxyImages ¶
func (s *SearchResult) ProxyImages(proxy string)
type TagResponse ¶
type TagResponse struct { AuthorID string `json:"authorId"` RawTags json.RawMessage `json:"tags"` }
type User ¶
type User struct { ID string `json:"userId"` Name string `json:"name"` Avatar string `json:"imageBig"` BackgroundImage string `json:"background"` Following int `json:"following"` MyPixiv int `json:"mypixivCount"` Comment template.HTML `json:"commentHtml"` Artworks []IllustShort `json:"artworks"` ArtworksCount int FrequentTags []FrequentTag }
func (*User) ProxyImages ¶
Click to show internal directories.
Click to hide internal directories.