# HG changeset patch # User Mikael Berthe # Date 1495883928 -7200 # Node ID eb9e257ba50cc63ef7dd9d87f8e6af61c8d88fec # Parent faa72b9877c587fae207162e1c5640f555db0e5a Sync types with current Mastodon documentation diff -r faa72b9877c5 -r eb9e257ba50c types.go --- a/types.go Fri May 26 21:21:54 2017 +0200 +++ b/types.go Sat May 27 13:18:48 2017 +0200 @@ -52,20 +52,29 @@ // Attachment represents a Mastodon attachement entity type Attachment struct { - ID int64 `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"` + ID int64 `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"` + Meta *interface{} `json:"meta"` } // Card represents a Mastodon card entity type Card struct { - URL string `json:"url"` - Title string `json:"title"` - Description string `json:"description"` - Image string `json:"image"` + 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 *int `json:"width"` + Height *int `json:"height"` } // Context represents a Mastodon context entity @@ -107,12 +116,13 @@ // Relationship represents a Mastodon relationship entity type Relationship struct { - ID int64 `json:"id"` - Following bool `json:"following"` - FollowedBy bool `json:"followed_by"` - Blocking bool `json:"blocking"` - Muting bool `json:"muting"` - Requested bool `json:"requested"` + ID int64 `json:"id"` + Following bool `json:"following"` + FollowedBy bool `json:"followed_by"` + Blocking bool `json:"blocking"` + Muting bool `json:"muting"` + Requested bool `json:"requested"` + DomainBlocking bool `jsin:"domain_blocking"` } // Report represents a Mastodon report entity