Documentation
¶
Index ¶
- Constants
- func GetRankingCalendar(c *fiber.Ctx, mode string, year, month int) (template.HTML, error)
- func GetUserArtworksID(id, category string, page int) (string, int, error)
- func ProxyImages(s, proxy string) string
- type ArtworkBrief
- func GetDiscoveryArtwork(c *fiber.Ctx, mode string) ([]ArtworkBrief, error)
- func GetNewestArtworks(c *fiber.Ctx, worktype string, r18 string) ([]ArtworkBrief, error)
- func GetNewestFromFollowing(c *fiber.Ctx, mode, page string) ([]ArtworkBrief, error)
- func GetRelatedArtworks(c *fiber.Ctx, id string) ([]ArtworkBrief, error)
- func GetUserArtworks(c *fiber.Ctx, id, ids string) ([]ArtworkBrief, error)
- func GetUserBookmarks(c *fiber.Ctx, id, mode string, page int) ([]ArtworkBrief, int, error)
- type Comment
- type FrequentTag
- type Illust
- type Image
- type ImageResponse
- type Ranking
- type SearchArtworks
- type SearchResult
- type Tag
- type TagDetail
- type User
- type UserBrief
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 GetRankingCalendar ¶
func ProxyImages ¶
Types ¶
type ArtworkBrief ¶
type ArtworkBrief struct { ID string `json:"id"` Title string `json:"title"` ArtistID string `json:"userId"` ArtistName string `json:"userName"` ArtistAvatar string `json:"profileImageUrl"` Thumbnail string `json:"url"` Pages int `json:"pageCount"` XRestrict int `json:"xRestrict"` AiType int `json:"aiType"` }
func GetDiscoveryArtwork ¶
func GetDiscoveryArtwork(c *fiber.Ctx, mode string) ([]ArtworkBrief, error)
func GetNewestArtworks ¶
func GetNewestArtworks(c *fiber.Ctx, worktype string, r18 string) ([]ArtworkBrief, error)
func GetNewestFromFollowing ¶
func GetNewestFromFollowing(c *fiber.Ctx, mode, page string) ([]ArtworkBrief, error)
func GetRelatedArtworks ¶
func GetRelatedArtworks(c *fiber.Ctx, id string) ([]ArtworkBrief, error)
func GetUserArtworks ¶
func GetUserArtworks(c *fiber.Ctx, id, ids string) ([]ArtworkBrief, error)
func GetUserBookmarks ¶
func GetUserBookmarks(c *fiber.Ctx, id, mode string, page int) ([]ArtworkBrief, int, error)
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 GetArtworkComments ¶
type FrequentTag ¶
func GetFrequentTags ¶
func GetFrequentTags(ids string) ([]FrequentTag, error)
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 UserBrief RecentWorks []ArtworkBrief RelatedWorks []ArtworkBrief CommentsList []Comment IsUgoira bool }
func GetArtworkByID ¶
type Image ¶
type Image struct { Small string `json:"thumb_mini"` Medium string `json:"small"` Large string `json:"regular"` Original string `json:"original"` }
func GetArtworkImages ¶
type ImageResponse ¶
type Ranking ¶
type Ranking struct { Contents []struct { Title string `json:"title"` Image string `json:"url"` Pages string `json:"illust_page_count"` ArtistName string `json:"user_name"` ArtistAvatar string `json:"profile_img"` ID int `json:"illust_id"` ArtistID int `json:"user_id"` Rank int `json:"rank"` } `json:"contents"` Mode string `json:"mode"` Content string `json:"content"` Page int `json:"page"` Date string `json:"date"` RankTotal int `json:"rank_total"` CurrentDate string `json:"date"` PrevDateRaw json.RawMessage `json:"prev_date"` NextDateRaw json.RawMessage `json:"next_date"` PrevDate string NextDate string }
func GetRanking ¶
type SearchArtworks ¶ added in v2.0.1
type SearchArtworks struct { Artworks []ArtworkBrief `json:"data"` Total int `json:"total"` }
type SearchResult ¶ added in v2.0.1
type SearchResult struct { Artworks SearchArtworks Popular struct { Permanent []ArtworkBrief `json:"permanent"` Recent []ArtworkBrief `json:"recent"` } `json:"popular"` RelatedTags []string `json:"relatedTags"` }
func GetSearch ¶ added in v2.0.1
func GetSearch(c *fiber.Ctx, artworkType, name, order, age_settings, page string) (*SearchResult, error)
type TagDetail ¶ added in v2.0.1
type TagDetail struct { Name string `json:"tag"` AlternativeName string `json:"word"` Metadata struct { Detail string `json:"abstract"` Image string `json:"image"` Name string `json:"tag"` ID json.Number `json:"id"` } `json:"pixpedia"` }
func GetTagData ¶ added in v2.0.1
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"` Webpage string `json:"webpage"` SocialRaw json.RawMessage `json:"social"` Artworks []ArtworkBrief `json:"artworks"` ArtworksCount int FrequentTags []FrequentTag Social map[string]map[string]string Background map[string]interface{} `json:"background"` }
func GetUserArtwork ¶
func (*User) ParseSocial ¶
func (s *User) ParseSocial()
Click to show internal directories.
Click to hide internal directories.