Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client represents the client used for making http requests, including the session if used.
func Authenticate ¶
Authenticate is equivalent to Login(), but instead it uses an API or session key
func Login ¶
Login will login to an account with the provided credentials and give you a Client with user info back
func (*Client) GetDomains ¶
GetDomains gets an array of uploadable domains
func (*Client) UpdateAccountInfo ¶
UpdateAccountInfo is a wrapper for GetAccountInfo() that replaces user info automatically
type Domain ¶
type Domain struct { Hostname string `json:"domain"` ID int `json:"id"` Public bool `json:"public"` System bool `json:"system"` OwnerID int `json:"ownerId"` Disabled bool `json:"disabled"` }
Domain represents a pxl.blue host.
type Upload ¶
type Upload struct { ShortID string `json:"shortId"` Host string `json:"host"` Path string `json:"path"` Size int `json:"size"` UploadTime time.Time `json:"uploadTime"` URL string `json:"url"` Hash string `json:"hash"` Uploader int `json:"uploader"` ContentType string `json:"contentType"` OriginalName string `json:"originalName"` UploaderIP string `json:"uploaderIp"` ID int `json:"id"` Deleted bool `json:"deleted"` DeletionReason string `json:"deletionReason"` DeletionKey string `json:"deletionKey"` }
Upload represents an uploaded file, referred to as an "image" in the UI
type User ¶
type User struct { ID int `json:"id"` Username string `json:"username"` Email string `json:"email"` RegistrationDate time.Time `json:"registrationDate"` LastLogin time.Time `json:"lastLogin"` UploadKey string `json:"uploadKey"` APIKey string `json:"apiKey"` RegistrationIP string `json:"registrationIp"` Moderator bool `json:"moderator"` Admin bool `json:"admin"` MailAccess bool `json:"mailAccess"` MailAccessExpires time.Time `json:"mailAccessExpires"` MailAccountCreated bool `json:"mailAccountCreated"` MailAliasLimit int `json:"mailAliasLimit"` Banned bool `json:"banned"` BanReason string `json:"banReason"` ImageCount int `json:"imageCount"` DiscordID string `json:"discordId"` DiscordTag string `json:"discordTag"` MatrixAccountCreated bool `json:"matrixAccountCreated"` DiscordLinked bool `json:"settings_discordLink"` APISecurity bool `json:"settings_apiIpSecurity"` }
User holds all of the information about a user that is accessible from the profile page
func GetAccountInfo ¶
GetAccountInfo gets info of a user of a given authentication key