From a1f49af1d93bccdd56d4538b149884418bd2ca2c Mon Sep 17 00:00:00 2001 From: r Date: Fri, 20 Dec 2019 18:30:20 +0000 Subject: Add user page and follow/unfollow calls --- mastodon/accounts.go | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'mastodon') diff --git a/mastodon/accounts.go b/mastodon/accounts.go index e6f5a6d..8cee6bb 100644 --- a/mastodon/accounts.go +++ b/mastodon/accounts.go @@ -9,27 +9,32 @@ import ( "time" ) +type AccountPleroma struct { + Relationship Relationship `json:"relationship"` +} + // Account hold information for mastodon account. type Account struct { - ID string `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"` + ID string `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"` + Pleroma AccountPleroma `json:"pleroma"` } // Field is a Mastodon account profile field. -- cgit v1.2.3