From c5ee57c8813a5fd4b24082574b93fa1cfe36ccf6 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Tue, 26 Sep 2023 13:54:59 +0900 Subject: [PATCH] initial commits --- account.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 account.go diff --git a/account.go b/account.go new file mode 100644 index 0000000..832f682 --- /dev/null +++ b/account.go @@ -0,0 +1,36 @@ +package mstdn + +import ( + "sourcecode.social/reiver/go-opt" + "sourcecode.social/reiver/go-jsonint" +) + +// Account represents a Mastodon API "Account". +// +// See: +// https://docs.joinmastodon.org/entities/Account/ +type Account struct { + ID opt.Optional[string] `json:"id"` + UserName opt.Optional[string] `json:"username"` + Acct opt.Optional[string] `json:"acct"` + DisplayName opt.Optional[string] `json:"display_name"` + Locked opt.Optional[bool] `json:"locked"` + Bot opt.Optional[bool] `json:"bot"` + Discoverable opt.Optional[bool] `json:"discoverable"` + CreatedAt opt.Optional[string] `json:"created_at"` + Note opt.Optional[string] `json:"note"` + URL opt.Optional[string] `json:"url"` + URI opt.Optional[string] `json:"uri"` + Avatar opt.Optional[string] `json:"avatar"` + AvatarStatic opt.Optional[string] `json:"avatar_static"` + Header opt.Optional[string] `json:"header"` + HeaderStatic opt.Optional[string] `json:"header_static"` + FollowersCount opt.Optional[jsonint.Int] `json:"followers_count"` + FollowingCount opt.Optional[jsonint.Int] `json:"following_count"` + StatusesCount opt.Optional[jsonint.Int] `json:"statuses_count"` + LastStatusAt opt.Optional[string] `json:"last_status_at"` + NoIndex opt.Optional[bool] `json:"noindex"` + Emojis []CustomEmoji `json:"emojis"` + Roles []Role `json:"roles"` + Fields []Field `json:"fields"` +}