2024-01-30 11:26:41 +00:00
package ap
import (
"net/url"
"time"
)
2024-01-31 16:56:07 +00:00
// An account
2024-01-30 11:26:41 +00:00
type Person struct {
Context map [ string ] any ` json:"@context" ` // Big chunk of hopefully don't give a fuck
ID url . URL ` json:"id" ` // URL to this resource
2024-01-31 16:56:07 +00:00
Type string ` json:"type" ` // Should always be of content "Person" (or "Service", if a bot)
2024-01-30 11:26:41 +00:00
Following url . URL ` json:"following" ` // Ordered collection of accounts this account follows
Followers url . URL ` json:"followers" ` // Ordered collection of accounts following this account
Inbox url . URL ` json:"inbox" ` // Where others send activities to (posts, follow requests, reactions, etc)
Outbox url . URL ` json:"outbox" ` // Where others can read this account's activities from
2024-01-31 16:56:07 +00:00
Featured url . URL ` json:"featured" ` // Ordered collection of something featured - TODO: Find out what this is
2024-01-30 11:26:41 +00:00
PreferredUsername string ` json:"preferredUsername" ` // Username
Name string ` json:"name" ` // Vanity name
Summary string ` json:"summary" ` // Description of the account. Could contain html or maybe mfm for *key
Url url . URL ` json:"url" ` // Public location of the account
2024-01-31 16:56:07 +00:00
ManualApproval bool ` json:"manuallyApprovesFollowers" ` // Does this account have to approve of follows before they are actual follows?
2024-01-30 11:26:41 +00:00
Discoverable bool ` json:"discoverable" ` // If this account can be found via search things? I guess?
PublicKey PublicKey ` json:"publicKey" ` // public key of that account. For verifying that that account is actually them
2024-01-31 16:56:07 +00:00
Tag [ ] Emote ` json:"tag" ` // Contains custom emote info - TODO: Add proper type
2024-01-30 11:26:41 +00:00
Attachment PersonInfoField ` json:"attachment" ` // Additional profile information (fields below the description, like "Source: https://gitlab.com/mstarongitlab/linstrom")
Endpoints map [ string ] string ` json:"endpoints" ` // Stores at least the shared inbox of the server this account is on in "sharedInbox", which is an url
2024-01-31 16:56:07 +00:00
Icon * Media ` json:"icon" ` // Profile image of the account, null if not set
Image * Media ` json:"image" ` // Header image of the account, null if not set
2024-01-30 11:26:41 +00:00
2024-01-31 16:56:07 +00:00
// Section: Mastodon only
Indexable * bool ` json:"indexable,omitempty" ` // Probably if this account will be shown to search engines and crawlers?
FeaturedTags * url . URL ` json:"featuredTags,omitempty" ` // Collection of something, not ordered - TODO: Find out what this is
Published * time . Time ` json:"published,omitempty" ` // When this account was created I guess?
Memorial * bool ` json:"memorial,omitempty" ` // If this account is closed? Or moved? Probably closed
Devices * url . URL ` json:"devices,omitempty" ` // Collection of something - TODO: Find out what this is
// Section: Misskey only
SharedInbox * url . URL ` json:"sharedInbox,omitempty" ` // Replicates the shared inbox url here I guess
MkSummary * string ` json:"_misskey_summary,omitempty" ` // Misskey's version of the summary
Background * url . URL ` json:"backgroundUrl,omitempty" ` // Background image
IsCat * bool ` json:"isCat,omitempty" ` // Is the user a cat (apply cat ears in that case)
NoIndex * bool ` json:"noindex,omitempty" ` // probably the same as Indexable, just reversed?
SpeakAsCat * bool ` json:"speakAsCat,omitempty" ` // Does the account speak like a cat
Birthday * string ` json:"vcard:bday,omitempty" ` // Birthday date, but doesn't quite follow normalised datetime
Location * string ` json:"vcard:Address,omitempty" ` // Where the user of the account lives, could technically be anything as just a string
// Section: Akkoma things
AlsoKnownAs * [ ] any ` json:"alsoKnownAs" ` // Meaning unknown
Capabilities * map [ string ] any ` json:"capabilities" ` // Meaning unknown
2024-01-30 11:26:41 +00:00
}