Documentation ¶
Index ¶
- Constants
- type BookmarkTagsResponse
- type Client
- func (p *Client) Followed(visi Visibility) (*IllustrationListing, error)
- func (p *Client) GetIllust(id int) (*Illustration, error)
- func (p *Client) GetMyId() int
- func (p *Client) GetRequest(url string) (*http.Response, error)
- func (p *Client) GetUser(id int) (*User, error)
- func (p *Client) IllustFromID(ID int) *Illustration
- func (p *Client) IsLoggedIn() bool
- func (p *Client) Login(token string) error
- func (p *Client) RankedIllust(mode RankingMode, day time.Time) (*IllustrationListing, error)
- func (p *Client) RecommendedIllust(kind IllustrationType) (*IllustrationListing, error)
- func (p *Client) RefreshToken() string
- func (p *Client) SearchIllust(term string, target SearchTarget, sorting SearchSort, duration SearchDuration) (*IllustrationListing, error)
- func (p *Client) SearchUser(term string, sorting SearchSort, duration SearchDuration) (*UserListing, error)
- func (p *Client) SetToken(access, refresh string)
- func (p *Client) UserFromID(ID int) *User
- type Comment
- type Comments
- type Illustration
- func (i *Illustration) Bookmark(visi Visibility) error
- func (i *Illustration) Fetch() error
- func (i *Illustration) GetComments(offset int) (*Comments, error)
- func (i *Illustration) GetRelated() (*IllustrationListing, error)
- func (i *Illustration) GetUgoiraMetadata() (*UgoiraMetadata, error)
- func (i *Illustration) Unbookmark() error
- type IllustrationListing
- type IllustrationType
- type RankingMode
- type SearchDuration
- type SearchSort
- type SearchTarget
- type UgoiraMetadata
- type User
- func (u *User) BookmarkTags(visi Visibility, offset int) (*BookmarkTagsResponse, error)
- func (u *User) Bookmarks(tag string, visibility Visibility) (*IllustrationListing, error)
- func (u *User) Fetch() error
- func (u *User) Follow(visi Visibility) error
- func (u *User) Followers() (*UserListing, error)
- func (u *User) Following(visi Visibility) (*UserListing, error)
- func (u *User) Illustrations(kind IllustrationType) (*IllustrationListing, error)
- func (u *User) Related() (*UserListing, error)
- func (u *User) Unfollow() error
- type UserListing
- type Visibility
Constants ¶
View Source
const ( Client_ID = "MOBrBDS8blbauoSck0ZfDbtuzpyT" Client_secret = "lsACyCD94FhDUtGTXi3QzcFE2uU1hqtDaKeqrdwj" )
View Source
const ( TAGS_PARTIAL SearchTarget = "partial_match_for_tags" TAGS_EXACT SearchTarget = "exact_match_for_tags" TITLE_AND_CAPTION SearchTarget = "title_and_caption" DATE_DESC SearchSort = "date_desc" DATE_ASC SearchSort = "date_asc" WITHIN_DAY SearchDuration = "within_last_day" WITHIN_WEEK SearchDuration = "within_last_week" WITHIN_MONTH SearchDuration = "within_last_month" WITHIN_NONE SearchDuration = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookmarkTagsResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Followed ¶ added in v1.2.0
func (p *Client) Followed(visi Visibility) (*IllustrationListing, error)
func (*Client) IllustFromID ¶
func (p *Client) IllustFromID(ID int) *Illustration
func (*Client) IsLoggedIn ¶
func (*Client) RankedIllust ¶
func (p *Client) RankedIllust(mode RankingMode, day time.Time) (*IllustrationListing, error)
func (*Client) RecommendedIllust ¶
func (p *Client) RecommendedIllust(kind IllustrationType) (*IllustrationListing, error)
func (*Client) RefreshToken ¶
func (*Client) SearchIllust ¶
func (p *Client) SearchIllust(term string, target SearchTarget, sorting SearchSort, duration SearchDuration) (*IllustrationListing, error)
func (*Client) SearchUser ¶
func (p *Client) SearchUser(term string, sorting SearchSort, duration SearchDuration) (*UserListing, error)
func (*Client) UserFromID ¶
type Illustration ¶
type Illustration struct { ID int Title string Type IllustrationType Image_urls multisize Caption string // What does this mean? Is it an R18 bool? Restrict int User *User Tags []struct { Name, Translated_name string } Create_date time.Time Page_count int Width int Height int // What do these mean? Sanity_level int X_restrict int Series struct { ID int Title string } Meta_single_page struct { Original_image_url string } Meta_pages []struct { Image_urls multisize } Total_view int Total_bookmarks int Is_bookmarked bool Is_muted bool Total_comments int // contains filtered or unexported fields }
func (*Illustration) Bookmark ¶
func (i *Illustration) Bookmark(visi Visibility) error
func (*Illustration) Fetch ¶
func (i *Illustration) Fetch() error
func (*Illustration) GetComments ¶
func (i *Illustration) GetComments(offset int) (*Comments, error)
func (*Illustration) GetRelated ¶
func (i *Illustration) GetRelated() (*IllustrationListing, error)
func (*Illustration) GetUgoiraMetadata ¶
func (i *Illustration) GetUgoiraMetadata() (*UgoiraMetadata, error)
func (*Illustration) Unbookmark ¶
func (i *Illustration) Unbookmark() error
type IllustrationListing ¶
type IllustrationListing struct {
// contains filtered or unexported fields
}
func (*IllustrationListing) Buffered ¶
func (ls *IllustrationListing) Buffered() int
func (*IllustrationListing) HasNext ¶
func (ls *IllustrationListing) HasNext() bool
func (*IllustrationListing) Next ¶
func (ls *IllustrationListing) Next() (*Illustration, error)
func (*IllustrationListing) NextRequiresFetch ¶
func (ls *IllustrationListing) NextRequiresFetch() bool
type IllustrationType ¶
type IllustrationType string
const ( ILTYPE_ILUST IllustrationType = "illust" ILTYPE_UGOIRA IllustrationType = "ugoira" ILTYPE_MANGA IllustrationType = "manga" // ILTYPE_NOVEL IllustrationType = "novel" ILTYPE_NONE IllustrationType = "" )
type RankingMode ¶
type RankingMode string
const ( DAY RankingMode = "day" WEEK RankingMode = "week" MONTH RankingMode = "month" DAY_MALE RankingMode = "day_male" DAY_FEMALE RankingMode = "day_female" WEEK_ORIGINAL RankingMode = "week_original" WEEK_ROOKIE RankingMode = "week_rookie" )
type SearchDuration ¶
type SearchDuration string
type SearchSort ¶
type SearchSort string
type SearchTarget ¶
type SearchTarget string
type UgoiraMetadata ¶
type User ¶
type User struct { ID int Name string Account string Profile_image_urls multisize Is_followed bool Comment string // contains filtered or unexported fields }
func (*User) BookmarkTags ¶
func (u *User) BookmarkTags(visi Visibility, offset int) (*BookmarkTagsResponse, error)
func (*User) Bookmarks ¶
func (u *User) Bookmarks(tag string, visibility Visibility) (*IllustrationListing, error)
func (*User) Follow ¶
func (u *User) Follow(visi Visibility) error
func (*User) Followers ¶
func (u *User) Followers() (*UserListing, error)
This probably returns empty unless the user is us
func (*User) Following ¶
func (u *User) Following(visi Visibility) (*UserListing, error)
func (*User) Illustrations ¶
func (u *User) Illustrations(kind IllustrationType) (*IllustrationListing, error)
func (*User) Related ¶
func (u *User) Related() (*UserListing, error)
type UserListing ¶
type UserListing struct {
// contains filtered or unexported fields
}
func (*UserListing) Buffered ¶
func (ls *UserListing) Buffered() int
func (*UserListing) HasNext ¶
func (ls *UserListing) HasNext() bool
func (*UserListing) Next ¶
func (ls *UserListing) Next() (*User, error)
func (*UserListing) NextRequiresFetch ¶
func (ls *UserListing) NextRequiresFetch() bool
type Visibility ¶
type Visibility string
const VISI_PRIVATE Visibility = "private"
const VISI_PUBLIC Visibility = "public"
Click to show internal directories.
Click to hide internal directories.