Added page about instance

This commit is contained in:
localhost_frssoft 2022-10-12 13:34:41 +03:00
parent fe304f60e9
commit 7dd90ac015
7 changed files with 81 additions and 0 deletions

View file

@ -17,6 +17,8 @@ type Instance struct {
Stats *InstanceStats `json:"stats,omitempty"`
Languages []string `json:"languages"`
ContactAccount *Account `json:"account"`
MaxTootChars *int64 `json:"max_toot_chars"`
Pleroma *PleromaInstance `json:"pleroma"`
}
// InstanceStats hold information for mastodon instance stats.
@ -26,6 +28,16 @@ type InstanceStats struct {
DomainCount int64 `json:"domain_count"`
}
// For about instance if this Pleroma
type PleromaInstance struct {
MetaData MetaData `json:"metadata"`
}
type MetaData struct {
Features *[]string `json:"features"`
}
// GetInstance return Instance.
func (c *Client) GetInstance(ctx context.Context) (*Instance, error) {
var instance Instance