Documentation ¶
Index ¶
- Constants
- Variables
- func APILog(url, user string, length int, response *http.Response, err error)
- func FavoritePost(user, apitoken string, id int) (*types.TPostInfo, error)
- func FetchOnePost(user, apitoken string, id int) (*types.TPostInfo, error)
- func FetchUser(username, api_key string) (*types.TUserInfo, error)
- func GetTagData(user, apitoken string, id int) (*types.TTagData, error)
- func Init(s settings) error
- func ListPosts(user, apitoken string, options types.ListPostOptions) (types.TPostInfoArray, error)
- func ListTagAliases(user, apitoken string, options types.ListTagAliasOptions) (types.TAliasInfoArray, error)
- func ListTags(user, apitoken string, options types.ListTagsOptions) (types.TTagInfoArray, error)
- func LocationToURL(location string) string
- func LocationToURLWithRating(location string, rating types.PostRating) string
- func SanitizeRating(input string) (types.PostRating, error)
- func SanitizeRatingForEdit(input string) (types.PostRating, error)
- func TestLogin(user, apitoken string) (*types.TUserInfo, bool, error)
- func UnfavoritePost(user, apitoken string, id int) error
- func UnvotePost(user, apitoken string, id int) error
- func UpdatePost(user, apitoken string, id int, tagdiff tags.TagDiff, rating types.PostRating, ...) (*types.TPostInfo, error)
- func VotePost(user, apitoken string, id int, vote types.PostVote, no_unvote bool) (*types.TPostScore, error)
- type FailedCall
- type UploadCallResult
Constants ¶
View Source
const DefaultBlacklist string = "gore\nscat\nwatersports\nyoung -rating:s\nloli\nshota"
Variables ¶
View Source
var ApiName string
View Source
var Endpoint string
View Source
var FilteredEndpoint string
View Source
var MissingArguments error = errors.New("Missing file or upload_url")
View Source
var PostIsDeleted error = errors.New("This post has been deleted.")
View Source
var StaticPrefix string
Functions ¶
func FavoritePost ¶
you shouldn't depend on this to return anything useful, as it will return nil if you favorite the same post twice
func ListPosts ¶
func ListPosts(user, apitoken string, options types.ListPostOptions) (types.TPostInfoArray, error)
func ListTagAliases ¶
func ListTagAliases(user, apitoken string, options types.ListTagAliasOptions) (types.TAliasInfoArray, error)
func ListTags ¶
func ListTags(user, apitoken string, options types.ListTagsOptions) (types.TTagInfoArray, error)
func LocationToURL ¶
func LocationToURLWithRating ¶
func LocationToURLWithRating(location string, rating types.PostRating) string
func SanitizeRating ¶
func SanitizeRating(input string) (types.PostRating, error)
filters rating tags into valid rating letters. "clean" is not a valid rating, but for convenience, it is treated as identical to "safe".
func SanitizeRatingForEdit ¶
func SanitizeRatingForEdit(input string) (types.PostRating, error)
filters ratings into valid rating letters, and the zero value to revert a change.
func UnfavoritePost ¶
func UnvotePost ¶
func UpdatePost ¶
Types ¶
type FailedCall ¶
type FailedCall struct {
Success bool `json:"success"`
}
type UploadCallResult ¶
type UploadCallResult struct { Success bool `json:"success"` Reason *string `json:"reason"` Location *string `json:"location"` StatusCode int Status string }
func UploadFile ¶
Click to show internal directories.
Click to hide internal directories.