Documentation ¶
Index ¶
- Variables
- func AccountFavourites(ctx Context, limit int, sinceID, minID, maxID string) ([]models.Status, error)
- func AccountFollow(ctx Context, userID string) error
- func AccountFollowRequests(ctx Context, limit int, sinceID, maxID string) ([]models.Account, error)
- func AccountFollowRequestsAccept(ctx Context, userID string) error
- func AccountFollowRequestsCancel(ctx Context, userID string) error
- func AccountFollowRequestsReject(ctx Context, userID string) error
- func AccountFollowers(ctx Context, userID string, limit int, sinceID, minID, maxID string) ([]models.Account, error)
- func AccountFollowing(ctx Context, userID string, limit int, sinceID, minID, maxID string) ([]models.Account, error)
- func AccountMute(ctx Context, userID string, duration int64) error
- func AccountRelationships(ctx Context, userIDs []string) ([]models.Relationship, error)
- func AccountUnfollow(ctx Context, userID string) error
- func AccountUnmute(ctx Context, userID string) error
- func AccountsGet(ctx Context, userID string) (models.Account, error)
- func AccountsLookup(ctx Context, acct string) (models.Account, error)
- func AccountsStatuses(ctx Context, uid string, limit int, ...) ([]models.Status, error)
- func ApplicationCreate(server, clientName, redirectUris, scopes, website string) (models.Application, error)
- func Instance(server, version string) (models.Instance, error)
- func InstanceCustomEmojis(server string) ([]models.CustomEmoji, error)
- func InstancePeers(server string) ([]string, error)
- func MediaUpload(ctx Context, file *multipart.FileHeader, description string) (models.MediaAttachment, error)
- func NodeInfo(server string, ni models.NodeInfo) (models.NodeInfo, error)
- func OAuthAuthorize(server, secret string) (string, error)
- func OAuthToken(server, token, secret string) (string, string, error)
- func PostNewStatus(ctx Context, status *string, Poll any, MediaIDs []string, InReplyToID string, ...) (any, error)
- func SearchStatusByHashtag(ctx Context, hashtag string, limit int, maxId, sinceId, minId string) ([]models.Status, error)
- func SetHeader(header, value string)
- func StatusBookmark(ctx Context, id string) (models.Status, error)
- func StatusBookmarks(ctx Context, limit int, sinceID, minID, maxID string) ([]models.Status, error)
- func StatusFavourite(ctx Context, id string) (models.Status, error)
- func StatusSingle(ctx Context, statusID string) (models.Status, error)
- func StatusUnBookmark(ctx Context, id string) (models.Status, error)
- func StatusUnFavourite(ctx Context, id string) (models.Status, error)
- func TimelineHome(ctx Context, limit int, maxId, minId string) ([]models.Status, error)
- func TimelinePublic(ctx Context, timelineType models.TimelinePublicType, onlyMedia bool, limit int, ...) ([]models.Status, error)
- func TrendsStatus(ctx Context, limit, offset int) ([]models.Status, error)
- func TrendsTags(ctx Context, limit, offset int) ([]models.Tag, error)
- func UpdateCredentials(ctx Context, displayName, note *string, locked, bot, discoverable *bool, ...) (models.CredentialAccount, error)
- func VerifyCredentials(ctx Context) (models.CredentialAccount, error)
- func WebFinger(server, resource string, writer http.ResponseWriter) error
- type Context
- type ServerError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrAcctIsInvalid = errors.New("acct format is invalid") ErrRateLimit = errors.New("rate limit") )
View Source
var (
)
View Source
var SupportedMimeTypes = []string{
"image/png",
"image/gif",
"image/jpeg",
"image/webp",
"image/avif",
"image/apng",
"image/bmp",
"image/tiff",
"image/x-icon",
"audio/opus",
"video/ogg",
"audio/ogg",
"application/ogg",
"video/quicktime",
"video/mp4",
"audio/mp4",
"video/x-m4v",
"audio/x-m4a",
"video/3gpp",
"video/3gpp2",
"video/mpeg",
"audio/mpeg",
"video/webm",
"audio/webm",
"audio/aac",
"audio/x-flac",
"audio/vnd.wave",
}
SupportedMimeTypes is a list of supported mime types
Functions ¶
func AccountFavourites ¶
func AccountFollow ¶
func AccountFollowRequests ¶
func AccountFollowers ¶
func AccountFollowing ¶
func AccountRelationships ¶
func AccountRelationships(ctx Context, userIDs []string) ([]models.Relationship, error)
func AccountUnfollow ¶
func AccountUnmute ¶
func AccountsStatuses ¶
func ApplicationCreate ¶
func ApplicationCreate(server, clientName, redirectUris, scopes, website string) (models.Application, error)
func InstanceCustomEmojis ¶
func InstanceCustomEmojis(server string) ([]models.CustomEmoji, error)
func InstancePeers ¶
func MediaUpload ¶
func MediaUpload(ctx Context, file *multipart.FileHeader, description string) (models.MediaAttachment, error)
func OAuthAuthorize ¶
func PostNewStatus ¶
func PostNewStatus(ctx Context, status *string, Poll any, MediaIDs []string, InReplyToID string, Sensitive bool, SpoilerText string, Visibility models.StatusVisibility, Language string, ScheduledAt time.Time, ) (any, error)
PostNewStatus 发送新的 Status FIXME: Poll 未实现
func SearchStatusByHashtag ¶
func StatusBookmarks ¶
StatusBookmarks NOTE: 为了减少请求数量, 不支持 Bookmarked
func TimelineHome ¶
func TimelinePublic ¶
func UpdateCredentials ¶
func UpdateCredentials(ctx Context, displayName, note *string, locked, bot, discoverable *bool, sourcePrivacy *string, sourceSensitive *bool, sourceLanguage *string, fields []models.AccountField, avatar, header *multipart.FileHeader, ) (models.CredentialAccount, error)
UpdateCredentials updates the credentials of the user.
func VerifyCredentials ¶
func VerifyCredentials(ctx Context) (models.CredentialAccount, error)
Types ¶
type ServerError ¶
func (ServerError) Error ¶
func (e ServerError) Error() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.