Documentation ¶
Index ¶
- func DeletedPostsAfterId(id int) string
- func PostsAfterChangeSeq(change int) string
- func PostsAfterId(id int) string
- func SinglePostByMd5(md5 string) string
- type AliasSearchOrder
- type AliasStatus
- type ListPostOptions
- type ListTagAliasOptions
- type ListTagsOptions
- type PageSelector
- type PostRating
- type PostVote
- type TAliasData
- type TAliasInfoArray
- type TAliasListing
- type TApiStatus
- type THistoryArray
- type TPostFile
- type TPostFlags
- type TPostInfo
- type TPostInfoArray
- type TPostListing
- type TPostPreview
- type TPostRelationships
- type TPostSample
- type TPostScore
- type TPostTags
- type TSinglePostListing
- type TTagData
- type TTagHistory
- type TTagInfoArray
- type TTagListing
- type TUserInfo
- type TUserInfoArray
- type TagCategory
- type TagSearchOrder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeletedPostsAfterId ¶
func PostsAfterChangeSeq ¶
func PostsAfterId ¶
func SinglePostByMd5 ¶
Types ¶
type AliasSearchOrder ¶
type AliasSearchOrder string
const ASOCount AliasSearchOrder = "tag_count"
const ASOCreated AliasSearchOrder = "created_at"
const ASOName AliasSearchOrder = "name"
const ASOStatus AliasSearchOrder = "status"
const ASOUpdated AliasSearchOrder = "updated_at"
func (AliasSearchOrder) String ¶
func (this AliasSearchOrder) String() string
type AliasStatus ¶
type AliasStatus string
const ASActive AliasStatus = "Active"
const ASApproved AliasStatus = "Approved"
const ASDeleted AliasStatus = "Deleted"
const ASPending AliasStatus = "Pending"
const ASProcessing AliasStatus = "Processing"
const ASQueued AliasStatus = "Queued"
const ASRetired AliasStatus = "Retired"
func (AliasStatus) String ¶
func (this AliasStatus) String() string
type ListPostOptions ¶
type ListPostOptions struct { Page PageSelector Limit int SearchQuery string }
type ListTagAliasOptions ¶
type ListTagAliasOptions struct { Page PageSelector Limit int MatchAliases string // AntecedentCategory *TagCategory // ConsequentCategory *TagCategory // disabled right now due to unexpected behavior Status AliasStatus Order AliasSearchOrder }
type ListTagsOptions ¶
type ListTagsOptions struct { Page PageSelector Limit int MatchTags string Category *TagCategory Order TagSearchOrder HideEmpty bool HasWiki *bool HasArtist *bool }
type PageSelector ¶
func After ¶
func After(i int) PageSelector
func Before ¶
func Before(i int) PageSelector
func Page ¶
func Page(i int) PageSelector
func (PageSelector) String ¶
func (this PageSelector) String() string
type PostRating ¶
type PostRating string
const ( Explicit PostRating = "e" Questionable PostRating = "q" Safe PostRating = "s" Original PostRating = "" Invalid PostRating = "invalid" )
func RatingFromTagSet ¶
func RatingFromTagSet(ts tags.TagSet) PostRating
attempts to find a "rating:*" tag and interpret it, returning a rating string if it does and returning nothing if there isn't one.
func (PostRating) String ¶
func (r PostRating) String() string
type PostVote ¶
type PostVote int
const Downvote PostVote = -1
const Neutral PostVote = 0 // this can show up in API responses but you can't vote by specifying it, if you want to delete your vote, use the endpoint for that
const Upvote PostVote = 1
type TAliasData ¶
type TAliasInfoArray ¶
type TAliasInfoArray []TAliasData
type TAliasListing ¶
type TAliasListing struct {
Aliases TAliasInfoArray
}
func (*TAliasListing) UnmarshalJSON ¶
func (this *TAliasListing) UnmarshalJSON(b []byte) error
type TApiStatus ¶
type THistoryArray ¶
type THistoryArray []TTagHistory
type TPostFlags ¶
type TPostInfo ¶
type TPostInfo struct { // anonymous nested subcomponents TPostScore `json:"score"` TPostFile `json:"file"` TPostPreview `json:"preview"` TPostSample `json:"sample"` TPostFlags `json:"flags"` TPostRelationships `json:"relationships"` TPostTags `json:"tags"` Id int `json:"id"` Description string `json:"description"` Creator_id int `json:"uploader_id"` Change int `json:"change_seq"` Fav_count int `json:"fav_count"` Rating PostRating `json:"rating"` Comment_count int `json:"comment_count"` Sources []string `json:"sources,omitempty"` // contains filtered or unexported fields }
func (*TPostInfo) ExtendedTagSet ¶
func (*TPostInfo) MatchesBlacklist ¶
type TPostInfoArray ¶
type TPostInfoArray []TPostInfo
type TPostListing ¶
type TPostListing struct {
Posts TPostInfoArray
}
func (*TPostListing) UnmarshalJSON ¶
func (this *TPostListing) UnmarshalJSON(b []byte) error
type TPostPreview ¶
type TPostRelationships ¶
type TPostSample ¶
type TPostScore ¶
type TSinglePostListing ¶
type TSinglePostListing struct {
Post TPostInfo
}
func (*TSinglePostListing) UnmarshalJSON ¶
func (this *TSinglePostListing) UnmarshalJSON(b []byte) error
type TTagData ¶
type TTagData struct { Id int `json:"id" dml:"tag_id"` Name string `json:"name" dml:"tag_name"` Count int `json:"post_count" dml:"tag_count"` FullCount int `dml:"tag_count_full"` // this field is only present in the local DB Type TagCategory `json:"category" dml:"tag_type"` Locked *bool `json:"is_locked" dml:"tag_type_locked"` }
func (TTagData) ApparentCount ¶
type TTagHistory ¶
type TTagInfoArray ¶
type TTagInfoArray []TTagData
type TTagListing ¶
type TTagListing struct {
Tags TTagInfoArray
}
func (*TTagListing) UnmarshalJSON ¶
func (this *TTagListing) UnmarshalJSON(b []byte) error
type TUserInfo ¶
type TUserInfo struct { Id int `json:"id"` CreatedAt string `json:"created_at"` Name string `json:"name"` Level int `json:"level"` BaseUploadLimit int `json:"base_upload_limit"` PostUploadCount int `json:"post_upload_count"` PostUpdateCount int `json:"post_update_count"` NoteUpdateCount int `json:"note_update_count"` IsBanned bool `json:"is_banned"` CanApprovePosts bool `json:"can_approve_posts"` CanUploadFree bool `json:"can_upload_free"` LevelString string `json:"level_string"` Email string `json:"email"` // only present when logged in, and only for your own account Blacklist string `json:"blacklisted_tags"` }
type TUserInfoArray ¶
type TUserInfoArray []TUserInfo
type TagCategory ¶
type TagCategory int
const TCArtist TagCategory = 1
const TCCharacter TagCategory = 4
const TCCopyright TagCategory = 3
const TCGeneral TagCategory = 0
const TCInvalid TagCategory = 6
const TCLore TagCategory = 8
const TCMeta TagCategory = 7
const TCSpecies TagCategory = 5
func (TagCategory) Value ¶
func (this TagCategory) Value() int
type TagSearchOrder ¶
type TagSearchOrder string
const TSOCount TagSearchOrder = "count"
const TSOName TagSearchOrder = "name"
const TSONewest TagSearchOrder = "date" // default
func (TagSearchOrder) String ¶
func (this TagSearchOrder) String() string
Click to show internal directories.
Click to hide internal directories.