types.go
changeset 186 eb9e257ba50c
parent 185 faa72b9877c5
child 187 e1b1f4a168b7
equal deleted inserted replaced
185:faa72b9877c5 186:eb9e257ba50c
    50 	Website string `json:"website"`
    50 	Website string `json:"website"`
    51 }
    51 }
    52 
    52 
    53 // Attachment represents a Mastodon attachement entity
    53 // Attachment represents a Mastodon attachement entity
    54 type Attachment struct {
    54 type Attachment struct {
    55 	ID         int64  `json:"id"`
    55 	ID         int64        `json:"id"`
    56 	Type       string `json:"type"`
    56 	Type       string       `json:"type"`
    57 	URL        string `json:"url"`
    57 	URL        string       `json:"url"`
    58 	RemoteURL  string `json:"remote_url"`
    58 	RemoteURL  *string      `json:"remote_url"`
    59 	PreviewURL string `json:"preview_url"`
    59 	PreviewURL string       `json:"preview_url"`
    60 	TextURL    string `json:"text_url"`
    60 	TextURL    *string      `json:"text_url"`
       
    61 	Meta       *interface{} `json:"meta"`
    61 }
    62 }
    62 
    63 
    63 // Card represents a Mastodon card entity
    64 // Card represents a Mastodon card entity
    64 type Card struct {
    65 type Card struct {
    65 	URL         string `json:"url"`
    66 	URL          string  `json:"url"`
    66 	Title       string `json:"title"`
    67 	Title        string  `json:"title"`
    67 	Description string `json:"description"`
    68 	Description  string  `json:"description"`
    68 	Image       string `json:"image"`
    69 	Image        string  `json:"image"`
       
    70 	Type         *string `json:"type"`
       
    71 	AuthorName   *string `json:"author_name"`
       
    72 	AuthorURL    *string `json:"author_url"`
       
    73 	ProviderName *string `json:"provider_name"`
       
    74 	ProviderURL  *string `json:"provider_url"`
       
    75 	HTML         *string `json:"html"`
       
    76 	Width        *int    `json:"width"`
       
    77 	Height       *int    `json:"height"`
    69 }
    78 }
    70 
    79 
    71 // Context represents a Mastodon context entity
    80 // Context represents a Mastodon context entity
    72 type Context struct {
    81 type Context struct {
    73 	Ancestors   []Status `json:"ancestors"`
    82 	Ancestors   []Status `json:"ancestors"`
   105 	Status    *Status   `json:"status"`
   114 	Status    *Status   `json:"status"`
   106 }
   115 }
   107 
   116 
   108 // Relationship represents a Mastodon relationship entity
   117 // Relationship represents a Mastodon relationship entity
   109 type Relationship struct {
   118 type Relationship struct {
   110 	ID         int64 `json:"id"`
   119 	ID             int64 `json:"id"`
   111 	Following  bool  `json:"following"`
   120 	Following      bool  `json:"following"`
   112 	FollowedBy bool  `json:"followed_by"`
   121 	FollowedBy     bool  `json:"followed_by"`
   113 	Blocking   bool  `json:"blocking"`
   122 	Blocking       bool  `json:"blocking"`
   114 	Muting     bool  `json:"muting"`
   123 	Muting         bool  `json:"muting"`
   115 	Requested  bool  `json:"requested"`
   124 	Requested      bool  `json:"requested"`
       
   125 	DomainBlocking bool  `jsin:"domain_blocking"`
   116 }
   126 }
   117 
   127 
   118 // Report represents a Mastodon report entity
   128 // Report represents a Mastodon report entity
   119 type Report struct {
   129 type Report struct {
   120 	ID          int64  `json:"id"`
   130 	ID          int64  `json:"id"`