Documentation ¶
Index ¶
- Constants
- func CreatePaginator(base, ending string, current_page, max_page int) template.HTML
- func GetRandomColor() string
- func GetTemplateFunctions() template.FuncMap
- func ParseEmojis(s string) template.HTML
- func ParsePixivRedirect(s string) template.HTML
- func ParseTime(date time.Time) string
- type PixivClient
- func (p *PixivClient) AddCookie(key, value string)
- func (p *PixivClient) AddHeader(key, value string)
- func (p *PixivClient) GetArtworkByID(id string) (*models.Illust, error)
- func (p *PixivClient) GetArtworkComments(id string) ([]models.Comment, error)
- func (p *PixivClient) GetArtworkImages(id string) ([]models.Image, error)
- func (p *PixivClient) GetDiscoveryArtwork(mode string, count int) ([]models.IllustShort, error)
- func (p *PixivClient) GetFrequentTags(ids string) ([]models.FrequentTag, error)
- func (p *PixivClient) GetLandingPage(mode string) (models.LandingArtworks, error)
- func (p *PixivClient) GetNewestArtworks(worktype string, r18 string) ([]models.IllustShort, error)
- func (p *PixivClient) GetNewestFromFollowing(mode, page, token string) ([]models.IllustShort, error)
- func (p *PixivClient) GetRanking(mode string, content string, date string, page string) (models.RankingResponse, error)
- func (p *PixivClient) GetRankingLog(mode string, year, month int, image_proxy string) (template.HTML, error)
- func (p *PixivClient) GetRelatedArtworks(id string) ([]models.IllustShort, error)
- func (p *PixivClient) GetSearch(artworkType string, name string, order string, age_settings string, ...) (*models.SearchResult, error)
- func (p *PixivClient) GetTagData(name string) (models.TagDetail, error)
- func (p *PixivClient) GetUserArtworks(id string, ids string) ([]models.IllustShort, error)
- func (p *PixivClient) GetUserArtworksID(id string, category string, page int) (string, int, error)
- func (p *PixivClient) GetUserBasicInformation(id string) (models.UserShort, error)
- func (p *PixivClient) GetUserBookmarks(id string, mode string, page int) ([]models.IllustShort, int, error)
- func (p *PixivClient) GetUserInformation(id string, category string, page int) (*models.User, error)
- func (p *PixivClient) PixivRequest(URL string, tokens ...string) (json.RawMessage, error)
- func (p *PixivClient) Request(URL string, token ...string) (*http.Response, error)
- func (p *PixivClient) SetCookie(cookie map[string]string)
- func (p *PixivClient) SetHeader(header map[string]string)
- func (p *PixivClient) SetLang(lang string)
- func (p *PixivClient) SetSessionID(value string)
- func (p *PixivClient) SetUserAgent(value string)
- func (p *PixivClient) TextRequest(URL string, tokens ...string) (string, error)
Constants ¶
View Source
const ( ArtworkInformationURL = "https://www.pixiv.net/ajax/illust/%s" ArtworkImagesURL = "https://www.pixiv.net/ajax/illust/%s/pages" ArtworkRelatedURL = "https://www.pixiv.net/ajax/illust/%s/recommend/init?limit=%d" ArtworkCommentsURL = "https://www.pixiv.net/ajax/illusts/comments/roots?illust_id=%s&limit=100" ArtworkNewestURL = "https://www.pixiv.net/ajax/illust/new?limit=30&type=%s&r18=%s&lastId=%s" ArtworkRankingURL = "https://www.pixiv.net/ranking.php?format=json&mode=%s&content=%s%s&p=%s" ArtworkDiscoveryURL = "https://www.pixiv.net/ajax/discovery/artworks?mode=%s&limit=%d" SearchTagURL = "https://www.pixiv.net/ajax/search/tags/%s" SearchArtworksURL = "https://www.pixiv.net/ajax/search/%s/%s?order=%s&mode=%s&p=%s" SearchTopURL = "https://www.pixiv.net/ajax/search/top/%s" UserInformationURL = "https://www.pixiv.net/ajax/user/%s?full=1" UserBasicInformationURL = "https://www.pixiv.net/ajax/user/%s" UserArtworksURL = "https://www.pixiv.net/ajax/user/%s/profile/all" UserArtworksFullURL = "https://www.pixiv.net/ajax/user/%s/profile/illusts?work_category=illustManga&is_first_page=0&lang=en%s" UserBookmarksURL = "https://www.pixiv.net/ajax/user/%s/illusts/bookmarks?tag=&offset=%d&limit=48&rest=%s" FrequentTagsURL = "https://www.pixiv.net/ajax/tags/frequent/illust?%s" LandingPageURL = "https://www.pixiv.net/ajax/top/illust?mode=%s" NewestFromFollowURL = "https://www.pixiv.net/ajax/follow_latest/%s?mode=%s&p=%s" )
Variables ¶
This section is empty.
Functions ¶
func CreatePaginator ¶ added in v1.0.6
func GetRandomColor ¶
func GetRandomColor() string
func GetTemplateFunctions ¶
func ParseEmojis ¶ added in v1.0.5
func ParsePixivRedirect ¶ added in v1.0.5
Types ¶
type PixivClient ¶
type PixivClient struct { Client *http.Client Cookie map[string]string Header map[string]string Lang string }
func (*PixivClient) AddCookie ¶
func (p *PixivClient) AddCookie(key, value string)
func (*PixivClient) AddHeader ¶
func (p *PixivClient) AddHeader(key, value string)
func (*PixivClient) GetArtworkByID ¶
func (p *PixivClient) GetArtworkByID(id string) (*models.Illust, error)
func (*PixivClient) GetArtworkComments ¶
func (p *PixivClient) GetArtworkComments(id string) ([]models.Comment, error)
func (*PixivClient) GetArtworkImages ¶
func (p *PixivClient) GetArtworkImages(id string) ([]models.Image, error)
func (*PixivClient) GetDiscoveryArtwork ¶
func (p *PixivClient) GetDiscoveryArtwork(mode string, count int) ([]models.IllustShort, error)
func (*PixivClient) GetFrequentTags ¶
func (p *PixivClient) GetFrequentTags(ids string) ([]models.FrequentTag, error)
func (*PixivClient) GetLandingPage ¶
func (p *PixivClient) GetLandingPage(mode string) (models.LandingArtworks, error)
func (*PixivClient) GetNewestArtworks ¶
func (p *PixivClient) GetNewestArtworks(worktype string, r18 string) ([]models.IllustShort, error)
func (*PixivClient) GetNewestFromFollowing ¶
func (p *PixivClient) GetNewestFromFollowing(mode, page, token string) ([]models.IllustShort, error)
func (*PixivClient) GetRanking ¶
func (p *PixivClient) GetRanking(mode string, content string, date string, page string) (models.RankingResponse, error)
func (*PixivClient) GetRankingLog ¶
func (*PixivClient) GetRelatedArtworks ¶
func (p *PixivClient) GetRelatedArtworks(id string) ([]models.IllustShort, error)
func (*PixivClient) GetSearch ¶
func (p *PixivClient) GetSearch(artworkType string, name string, order string, age_settings string, page string) (*models.SearchResult, error)
func (*PixivClient) GetTagData ¶
func (p *PixivClient) GetTagData(name string) (models.TagDetail, error)
func (*PixivClient) GetUserArtworks ¶
func (p *PixivClient) GetUserArtworks(id string, ids string) ([]models.IllustShort, error)
func (*PixivClient) GetUserArtworksID ¶
func (*PixivClient) GetUserBasicInformation ¶
func (p *PixivClient) GetUserBasicInformation(id string) (models.UserShort, error)
func (*PixivClient) GetUserBookmarks ¶
func (p *PixivClient) GetUserBookmarks(id string, mode string, page int) ([]models.IllustShort, int, error)
func (*PixivClient) GetUserInformation ¶
func (*PixivClient) PixivRequest ¶
func (p *PixivClient) PixivRequest(URL string, tokens ...string) (json.RawMessage, error)
func (*PixivClient) SetCookie ¶
func (p *PixivClient) SetCookie(cookie map[string]string)
func (*PixivClient) SetHeader ¶
func (p *PixivClient) SetHeader(header map[string]string)
func (*PixivClient) SetLang ¶
func (p *PixivClient) SetLang(lang string)
func (*PixivClient) SetSessionID ¶
func (p *PixivClient) SetSessionID(value string)
func (*PixivClient) SetUserAgent ¶
func (p *PixivClient) SetUserAgent(value string)
func (*PixivClient) TextRequest ¶
func (p *PixivClient) TextRequest(URL string, tokens ...string) (string, error)
Click to show internal directories.
Click to hide internal directories.