mastodon

package module
v0.0.0-...-12af5ce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 19 Imported by: 0

README

go-mastodon

Fork of https://github.com/mattn/go-mastodon

Usage

package main

import (
	"fmt"
	"log"

	mastodon "git.gutmet.org/go-mastodon.git"
)

func main() {
	mastodon.Initialize(&mastodon.Config{
		Server:       "https://mstdn.jp",
		ClientID:     "client-id",
		ClientSecret: "client-secret",
		AccessToken:  "accessToken",
	})
	timeline, err := mastodon.GetHomeTimeline(nil)
	if err != nil {
		log.Fatal(err)
	}
	for i := len(timeline) - 1; i >= 0; i-- {
		fmt.Println(timeline[i])
	}
}

Status of implementations

  • GET /api/v1/accounts/:id
  • GET /api/v1/accounts/verify_credentials
  • PATCH /api/v1/accounts/update_credentials
  • GET /api/v1/accounts/:id/followers
  • GET /api/v1/accounts/:id/following
  • GET /api/v1/accounts/:id/statuses
  • POST /api/v1/accounts/:id/follow
  • POST /api/v1/accounts/:id/unfollow
  • GET /api/v1/accounts/:id/block
  • GET /api/v1/accounts/:id/unblock
  • GET /api/v1/accounts/:id/mute
  • GET /api/v1/accounts/:id/unmute
  • GET /api/v1/accounts/:id/lists
  • GET /api/v1/accounts/relationships
  • GET /api/v1/accounts/search
  • GET /api/v1/apps/verify_credentials
  • GET /api/v1/bookmarks
  • POST /api/v1/apps
  • GET /api/v1/blocks
  • GET /api/v1/conversations
  • DELETE /api/v1/conversations/:id
  • POST /api/v1/conversations/:id/read
  • GET /api/v1/favourites
  • GET /api/v1/filters
  • POST /api/v1/filters
  • GET /api/v1/filters/:id
  • PUT /api/v1/filters/:id
  • DELETE /api/v1/filters/:id
  • GET /api/v1/follow_requests
  • POST /api/v1/follow_requests/:id/authorize
  • POST /api/v1/follow_requests/:id/reject
  • POST /api/v1/follows
  • GET /api/v1/instance
  • GET /api/v1/instance/activity
  • GET /api/v1/instance/peers
  • GET /api/v1/lists
  • GET /api/v1/lists/:id/accounts
  • GET /api/v1/lists/:id
  • POST /api/v1/lists
  • PUT /api/v1/lists/:id
  • DELETE /api/v1/lists/:id
  • POST /api/v1/lists/:id/accounts
  • DELETE /api/v1/lists/:id/accounts
  • POST /api/v1/media
  • GET /api/v1/mutes
  • GET /api/v1/notifications
  • GET /api/v1/notifications/:id
  • POST /api/v1/notifications/:id/dismiss
  • POST /api/v1/notifications/clear
  • POST /api/v1/push/subscription
  • GET /api/v1/push/subscription
  • PUT /api/v1/push/subscription
  • DELETE /api/v1/push/subscription
  • GET /api/v1/reports
  • POST /api/v1/reports
  • GET /api/v2/search
  • GET /api/v1/statuses/:id
  • GET /api/v1/statuses/:id/context
  • GET /api/v1/statuses/:id/card
  • GET /api/v1/statuses/:id/reblogged_by
  • GET /api/v1/statuses/:id/favourited_by
  • POST /api/v1/statuses
  • DELETE /api/v1/statuses/:id
  • POST /api/v1/statuses/:id/reblog
  • POST /api/v1/statuses/:id/unreblog
  • POST /api/v1/statuses/:id/favourite
  • POST /api/v1/statuses/:id/unfavourite
  • POST /api/v1/statuses/:id/bookmark
  • POST /api/v1/statuses/:id/unbookmark
  • GET /api/v1/timelines/home
  • GET /api/v1/timelines/public
  • GET /api/v1/timelines/tag/:hashtag
  • GET /api/v1/timelines/list/:id
  • GET /api/v1/streaming/user
  • GET /api/v1/streaming/public
  • GET /api/v1/streaming/hashtag?tag=:hashtag
  • GET /api/v1/streaming/hashtag/local?tag=:hashtag
  • GET /api/v1/streaming/list?list=:list_id
  • GET /api/v1/streaming/direct

License

MIT

Author of original (https://github.com/mattn/go-mastodon)

Yasuhiro Matsumoto (a.k.a. mattn)

Screwed up by

Alexander Weinhold (a.k.a gutmet)

Documentation

Overview

Package mastodon provides functions and structs for accessing the mastodon API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeFollowRequest

func AuthorizeFollowRequest(account *Account) error

func Base64Encode

func Base64Encode(file *os.File) (string, error)

Base64Encode returns the base64 data URI format string of the file.

func Base64EncodeFileName

func Base64EncodeFileName(filename string) (string, error)

Base64EncodeFileName returns the base64 data URI format string of the file with the file name.

func ClearNotifications

func ClearNotifications() error

func GetInstancePeers

func GetInstancePeers() ([]string, error)

func Initialize

func Initialize(config *Config)

func RejectFollowRequest

func RejectFollowRequest(account *Account) error

func RemovePushSubscription

func RemovePushSubscription() error

func StreamingDirect

func StreamingDirect() (chan Event, error)

StreamingDirect returns a channel to read events on a direct messages.

func StreamingHashtag

func StreamingHashtag(tag string, isLocal bool) (chan Event, error)

StreamingHashtag returns a channel to read events on tagged timeline.

func StreamingPublic

func StreamingPublic(isLocal bool) (chan Event, error)

StreamingPublic returns a channel to read events on public.

func StreamingUser

func StreamingUser() (chan Event, error)

StreamingUser returns a channel to read events on home.

func String

func String(v string) *string

String is a helper function to get the pointer value of a string.

Types

type Account

type Account struct {
	ID             ID             `json:"id"`
	Username       string         `json:"username"`
	Acct           string         `json:"acct"`
	DisplayName    string         `json:"display_name"`
	Locked         bool           `json:"locked"`
	CreatedAt      time.Time      `json:"created_at"`
	FollowersCount int64          `json:"followers_count"`
	FollowingCount int64          `json:"following_count"`
	StatusesCount  int64          `json:"statuses_count"`
	Note           string         `json:"note"`
	URL            string         `json:"url"`
	Avatar         string         `json:"avatar"`
	AvatarStatic   string         `json:"avatar_static"`
	Header         string         `json:"header"`
	HeaderStatic   string         `json:"header_static"`
	Emojis         []Emoji        `json:"emojis"`
	Moved          *Account       `json:"moved"`
	Fields         []Field        `json:"fields"`
	Bot            bool           `json:"bot"`
	Discoverable   bool           `json:"discoverable"`
	Source         *AccountSource `json:"source"`
}

func FollowRemoteUser

func FollowRemoteUser(uri string) (*Account, error)

uri: username@domain of the person you want to follow

func GetAccount

func GetAccount(id ID) (*Account, error)

func GetBlockList

func GetBlockList(pg *Pagination) ([]*Account, error)

func GetCurrentAccount

func GetCurrentAccount() (*Account, error)

func GetFollowRequests

func GetFollowRequests(pg *Pagination) ([]*Account, error)

func GetMuteList

func GetMuteList(pg *Pagination) ([]*Account, error)

func LookupAccount

func LookupAccount(username string) (*Account, error)

func SearchAccounts

func SearchAccounts(q string, limit int64) ([]*Account, error)

func UpdateCurrentAccount

func UpdateCurrentAccount(profile *Profile) (*Account, error)

func (*Account) GetContainingLists

func (a *Account) GetContainingLists() ([]*List, error)

func (*Account) GetFollowers

func (a *Account) GetFollowers(pg *Pagination) ([]*Account, error)

func (*Account) GetFollowing

func (a *Account) GetFollowing(pg *Pagination) ([]*Account, error)

func (*Account) GetID

func (a *Account) GetID() string

func (*Account) GetPinnedStatuses

func (a *Account) GetPinnedStatuses() ([]*Status, error)

func (*Account) GetStatuses

func (a *Account) GetStatuses(excludeBoosts bool, pg *Pagination) ([]*Status, error)

func (*Account) Report

func (a *Account) Report(statuses []*Status, comment string) (*Report, error)

type AccountSource

type AccountSource struct {
	Privacy   *string  `json:"privacy"`
	Sensitive *bool    `json:"sensitive"`
	Language  *string  `json:"language"`
	Note      *string  `json:"note"`
	Fields    *[]Field `json:"fields"`
}

type AppConfig

type AppConfig struct {
	http.Client
	Server     string
	ClientName string

	// Where the user should be redirected after authorization (for no redirect, use urn:ietf:wg:oauth:2.0:oob)
	RedirectURIs string

	// This can be a space-separated list of items listed on the /settings/applications/new page of any Mastodon
	// instance. "read", "write", and "follow" are top-level scopes that include all the permissions of the more
	// specific scopes like "read:favourites", "write:statuses", and "write:follows".
	Scopes string

	// Optional.
	Website string
}

type Application

type Application struct {
	ID           ID     `json:"id"`
	RedirectURI  string `json:"redirect_uri"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`

	// AuthURI is not part of the Mastodon API; it is generated by go-mastodon.
	AuthURI string `json:"auth_uri,omitempty"`
}

func RegisterApp

func RegisterApp(appConfig *AppConfig) (*Application, error)

type ApplicationVerification

type ApplicationVerification struct {
	Name     string `json:"name"`
	Website  string `json:"website"`
	VapidKey string `json:"vapid_key"`
}

func GetAppCredentials

func GetAppCredentials() (*ApplicationVerification, error)

type Attachment

type Attachment struct {
	ID          ID             `json:"id"`
	Type        string         `json:"type"`
	URL         string         `json:"url"`
	RemoteURL   string         `json:"remote_url"`
	PreviewURL  string         `json:"preview_url"`
	TextURL     string         `json:"text_url"`
	Description string         `json:"description"`
	Meta        AttachmentMeta `json:"meta"`
}

func UploadMedia

func UploadMedia(file string) (*Attachment, error)

func UploadMediaFromBytes

func UploadMediaFromBytes(b []byte) (*Attachment, error)

func UploadMediaFromMedia

func UploadMediaFromMedia(media *Media) (*Attachment, error)

func UploadMediaFromReader

func UploadMediaFromReader(reader io.Reader) (*Attachment, error)

type AttachmentMeta

type AttachmentMeta struct {
	Original AttachmentSize `json:"original"`
	Small    AttachmentSize `json:"small"`
}

type AttachmentSize

type AttachmentSize struct {
	Width  int64   `json:"width"`
	Height int64   `json:"height"`
	Size   string  `json:"size"`
	Aspect float64 `json:"aspect"`
}

type Card

type Card struct {
	URL          string `json:"url"`
	Title        string `json:"title"`
	Description  string `json:"description"`
	Image        string `json:"image"`
	Type         string `json:"type"`
	AuthorName   string `json:"author_name"`
	AuthorURL    string `json:"author_url"`
	ProviderName string `json:"provider_name"`
	ProviderURL  string `json:"provider_url"`
	HTML         string `json:"html"`
	Width        int64  `json:"width"`
	Height       int64  `json:"height"`
}

type Client

type Client struct {
	http.Client
	Config    *Config
	UserAgent string
}

type Config

type Config struct {
	Server       string
	ClientID     string
	ClientSecret string
	AccessToken  string
}

type Context

type Context struct {
	Ancestors   []*Status `json:"ancestors"`
	Descendants []*Status `json:"descendants"`
}

type Conversation

type Conversation struct {
	ID         ID         `json:"id"`
	Accounts   []*Account `json:"accounts"`
	Unread     bool       `json:"unread"`
	LastStatus *Status    `json:"last_status"`
}

func GetConversations

func GetConversations(pg *Pagination) ([]*Conversation, error)

func (*Conversation) Delete

func (c *Conversation) Delete() error

func (*Conversation) GetID

func (c *Conversation) GetID() string

func (*Conversation) MarkAsRead

func (c *Conversation) MarkAsRead() error

type DeleteEvent

type DeleteEvent struct{ ID ID }

type Emoji

type Emoji struct {
	ShortCode       string `json:"shortcode"`
	StaticURL       string `json:"static_url"`
	URL             string `json:"url"`
	VisibleInPicker bool   `json:"visible_in_picker"`
}

type ErrorEvent

type ErrorEvent struct {
	// contains filtered or unexported fields
}

func (*ErrorEvent) Error

func (e *ErrorEvent) Error() string

type Event

type Event interface {
	// contains filtered or unexported methods
}

type Field

type Field struct {
	Name       string    `json:"name"`
	Value      string    `json:"value"`
	VerifiedAt time.Time `json:"verified_at"`
}

Field is a Mastodon account profile field.

type Filter

type Filter struct {
	ID           ID        `json:"id"`
	Phrase       string    `json:"phrase"`
	Context      []string  `json:"context"`
	WholeWord    bool      `json:"whole_word"`
	ExpiresAt    time.Time `json:"expires_at"`
	Irreversible bool      `json:"irreversible"`
}

func GetFilter

func GetFilter(filterId ID) (*Filter, error)

func GetFilters

func GetFilters() ([]*Filter, error)

func (*Filter) Create

func (f *Filter) Create() (*Filter, error)

func (*Filter) Delete

func (f *Filter) Delete() error

func (*Filter) GetID

func (f *Filter) GetID() string

func (*Filter) Update

func (f *Filter) Update(newFilter *Filter) (*Filter, error)

type History

type History struct {
	Day      string `json:"day"`
	Uses     string `json:"uses"`
	Accounts string `json:"accounts"`
}

type ID

type ID string

func (*ID) UnmarshalJSON

func (id *ID) UnmarshalJSON(data []byte) error

type Instance

type Instance struct {
	URI            string            `json:"uri"`
	Title          string            `json:"title"`
	Description    string            `json:"description"`
	EMail          string            `json:"email"`
	Version        string            `json:"version,omitempty"`
	Thumbnail      string            `json:"thumbnail,omitempty"`
	URLs           map[string]string `json:"urls,omitempty"`
	Stats          *InstanceStats    `json:"stats,omitempty"`
	Languages      []string          `json:"languages"`
	ContactAccount *Account          `json:"contact_account"`
}

func GetInstance

func GetInstance() (*Instance, error)

type InstanceStats

type InstanceStats struct {
	UserCount   int64 `json:"user_count"`
	StatusCount int64 `json:"status_count"`
	DomainCount int64 `json:"domain_count"`
}

type List

type List struct {
	ID    ID     `json:"id"`
	Title string `json:"title"`
}

func CreateList

func CreateList(title string) (*List, error)

func GetList

func GetList(id ID) (*List, error)

func GetLists

func GetLists() ([]*List, error)

func (*List) Add

func (l *List) Add(accounts ...*Account) error

Only accounts already followed by the user can be added to a list.

func (*List) Delete

func (l *List) Delete() error

func (*List) GetAccounts

func (l *List) GetAccounts() ([]*Account, error)

func (*List) GetID

func (l *List) GetID() string

func (*List) Remove

func (l *List) Remove(accounts ...*Account) error

func (*List) Rename

func (l *List) Rename(newTitle string) error

func (*List) Streaming

func (l *List) Streaming() (chan Event, error)

StreamingList returns a channel to read events on a list.

type Media

type Media struct {
	File        io.Reader
	Thumbnail   io.Reader
	Description string
	Focus       string
}

type Mention

type Mention struct {
	URL      string `json:"url"`
	Username string `json:"username"`
	Acct     string `json:"acct"`
	ID       ID     `json:"id"`
}

type Notification

type Notification struct {
	ID        ID        `json:"id"`
	Type      string    `json:"type"`
	CreatedAt time.Time `json:"created_at"`
	Account   Account   `json:"account"`
	Status    *Status   `json:"status"`
}

func GetNotification

func GetNotification(id ID) (*Notification, error)

func GetNotifications

func GetNotifications(pg *Pagination) ([]*Notification, error)

func (*Notification) Dismiss

func (n *Notification) Dismiss() error

func (*Notification) GetID

func (n *Notification) GetID() string

type NotificationEvent

type NotificationEvent struct {
	Notification *Notification `json:"notification"`
}

type Pagination

type Pagination struct {
	MaxID   ID
	SinceID ID
	MinID   ID
	Limit   int64
}

Pagination is a struct for specifying the get range.

type Poll

type Poll struct {
	ID          ID           `json:"id"`
	ExpiresAt   time.Time    `json:"expires_at"`
	Expired     bool         `json:"expired"`
	Multiple    bool         `json:"multiple"`
	VotesCount  int64        `json:"votes_count"`
	VotersCount int64        `json:"voters_count"`
	Options     []PollOption `json:"options"`
	Voted       bool         `json:"voted"`
	OwnVotes    []int        `json:"own_votes"`
	Emojis      []Emoji      `json:"emojis"`
}

func GetPoll

func GetPoll(id ID) (*Poll, error)

func (*Poll) GetID

func (p *Poll) GetID() string

func (*Poll) Vote

func (p *Poll) Vote(choices ...int) (*Poll, error)

type PollOption

type PollOption struct {
	Title      string `json:"title"`
	VotesCount int64  `json:"votes_count"`
}

type Profile

type Profile struct {
	// If it is nil it will not be updated.
	// If it is empty, update it with empty.
	DisplayName *string
	Note        *string
	Locked      *bool
	Fields      *[]Field
	Source      *AccountSource

	// Set the base64 encoded character string of the image.
	Avatar string
	Header string
}

type PushAlerts

type PushAlerts struct {
	Follow    *Sbool `json:"follow"`
	Favourite *Sbool `json:"favourite"`
	Reblog    *Sbool `json:"reblog"`
	Mention   *Sbool `json:"mention"`
}

type PushSubscription

type PushSubscription struct {
	ID        ID          `json:"id"`
	Endpoint  string      `json:"endpoint"`
	ServerKey string      `json:"server_key"`
	Alerts    *PushAlerts `json:"alerts"`
}

func AddPushSubscription

func AddPushSubscription(endpoint string, public ecdsa.PublicKey, shared []byte, alerts PushAlerts) (*PushSubscription, error)

func GetPushSubscription

func GetPushSubscription() (*PushSubscription, error)

func UpdatePushSubscription

func UpdatePushSubscription(alerts *PushAlerts) (*PushSubscription, error)

UpdatePushSubscription updates which type of notifications are sent for the active push subscription.

type Relationship

type Relationship struct {
	ID                  ID   `json:"id"`
	Following           bool `json:"following"`
	FollowedBy          bool `json:"followed_by"`
	Blocking            bool `json:"blocking"`
	Muting              bool `json:"muting"`
	MutingNotifications bool `json:"muting_notifications"`
	Requested           bool `json:"requested"`
	DomainBlocking      bool `json:"domain_blocking"`
	ShowingReblogs      bool `json:"showing_reblogs"`
	Endorsed            bool `json:"endorsed"`
}

func Block

func Block(account *Account) (*Relationship, error)

func Follow

func Follow(account *Account) (*Relationship, error)

func GetRelationships

func GetRelationships(accounts []*Account) ([]*Relationship, error)

func Mute

func Mute(account *Account) (*Relationship, error)

func Unblock

func Unblock(account *Account) (*Relationship, error)

func Unfollow

func Unfollow(account *Account) (*Relationship, error)

func Unmute

func Unmute(account *Account) (*Relationship, error)

type Report

type Report struct {
	ID          int64 `json:"id"`
	ActionTaken bool  `json:"action_taken"`
}

func GetReports

func GetReports() ([]*Report, error)

type Results

type Results struct {
	Accounts []*Account `json:"accounts"`
	Statuses []*Status  `json:"statuses"`
	Hashtags []*Tag     `json:"hashtags"`
}
func Search(q string, resolve bool) (*Results, error)

type Sbool

type Sbool bool

func (*Sbool) UnmarshalJSON

func (s *Sbool) UnmarshalJSON(data []byte) error

type Status

type Status struct {
	ID                 ID           `json:"id"`
	URI                string       `json:"uri"`
	URL                string       `json:"url"`
	Account            Account      `json:"account"`
	InReplyToID        interface{}  `json:"in_reply_to_id"`
	InReplyToAccountID interface{}  `json:"in_reply_to_account_id"`
	Reblog             *Status      `json:"reblog"`
	Content            string       `json:"content"`
	CreatedAt          time.Time    `json:"created_at"`
	Emojis             []Emoji      `json:"emojis"`
	RepliesCount       int64        `json:"replies_count"`
	ReblogsCount       int64        `json:"reblogs_count"`
	FavouritesCount    int64        `json:"favourites_count"`
	Reblogged          interface{}  `json:"reblogged"`
	Favourited         interface{}  `json:"favourited"`
	Bookmarked         interface{}  `json:"bookmarked"`
	Muted              interface{}  `json:"muted"`
	Sensitive          bool         `json:"sensitive"`
	SpoilerText        string       `json:"spoiler_text"`
	Visibility         string       `json:"visibility"`
	MediaAttachments   []Attachment `json:"media_attachments"`
	Mentions           []Mention    `json:"mentions"`
	Tags               []Tag        `json:"tags"`
	Card               *Card        `json:"card"`
	Poll               *Poll        `json:"poll"`
	Application        Application  `json:"application"`
	Language           string       `json:"language"`
	Pinned             interface{}  `json:"pinned"`
}

func GetBookmarks

func GetBookmarks(pg *Pagination) ([]*Status, error)

func GetDirectTimeline

func GetDirectTimeline(pg *Pagination) ([]*Status, error)

func GetFavourites

func GetFavourites(pg *Pagination) ([]*Status, error)

func GetHomeTimeline

func GetHomeTimeline(pg *Pagination) ([]*Status, error)

func GetListTimeline

func GetListTimeline(id ID, pg *Pagination) ([]*Status, error)

func GetMediaTimeline

func GetMediaTimeline(isLocal bool, pg *Pagination) ([]*Status, error)

GetTimelineMedia return statuses from media timeline. NOTE: This is an experimental feature of pawoo.net.

func GetPublicTimeline

func GetPublicTimeline(isLocal bool, pg *Pagination) ([]*Status, error)

func GetStatus

func GetStatus(id ID) (*Status, error)

func GetTaggedTimeline

func GetTaggedTimeline(tag string, isLocal bool, pg *Pagination) ([]*Status, error)

func PostStatus

func PostStatus(toot *Toot) (*Status, error)

func (*Status) Bookmark

func (s *Status) Bookmark() (*Status, error)

func (*Status) Delete

func (s *Status) Delete() error

func (*Status) DoReblog

func (s *Status) DoReblog() (*Status, error)

func (*Status) Favourite

func (s *Status) Favourite() (*Status, error)

func (*Status) GetCard

func (s *Status) GetCard() (*Card, error)

func (*Status) GetContext

func (s *Status) GetContext() (*Context, error)

func (*Status) GetFavouritedBy

func (s *Status) GetFavouritedBy(pg *Pagination) ([]*Account, error)

func (*Status) GetID

func (s *Status) GetID() string

func (*Status) GetRebloggedBy

func (s *Status) GetRebloggedBy(pg *Pagination) ([]*Account, error)

func (*Status) Unbookmark

func (s *Status) Unbookmark() (*Status, error)

func (*Status) Unfavourite

func (s *Status) Unfavourite() (*Status, error)

func (*Status) Unreblog

func (s *Status) Unreblog() (*Status, error)

type Tag

type Tag struct {
	Name    string    `json:"name"`
	URL     string    `json:"url"`
	History []History `json:"history"`
}

type Toot

type Toot struct {
	Status      string     `json:"status"`
	InReplyToID ID         `json:"in_reply_to_id"`
	MediaIDs    []ID       `json:"media_ids"`
	Sensitive   bool       `json:"sensitive"`
	SpoilerText string     `json:"spoiler_text"`
	Visibility  string     `json:"visibility"`
	Language    string     `json:"language"`
	ScheduledAt *time.Time `json:"scheduled_at,omitempty"`
	Poll        *TootPoll  `json:"poll"`
}

type TootPoll

type TootPoll struct {
	Options          []string `json:"options"`
	ExpiresInSeconds int64    `json:"expires_in"`
	Multiple         bool     `json:"multiple"`
	HideTotals       bool     `json:"hide_totals"`
}

type Unixtime

type Unixtime time.Time

func (*Unixtime) UnmarshalJSON

func (t *Unixtime) UnmarshalJSON(data []byte) error

type UpdateEvent

type UpdateEvent struct {
	Status *Status `json:"status"`
}

type Visibility

type Visibility string
const (
	Public        Visibility = "public"
	Unlisted      Visibility = "unlisted"
	FollowersOnly Visibility = "private"
	DirectMessage Visibility = "direct"
)

type WeeklyActivity

type WeeklyActivity struct {
	Week          Unixtime `json:"week"`
	Statuses      int64    `json:"statuses,string"`
	Logins        int64    `json:"logins,string"`
	Registrations int64    `json:"registrations,string"`
}

func GetInstanceActivity

func GetInstanceActivity() ([]*WeeklyActivity, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL