implement structs

pull/10/head
Yasuhiro Matsumoto 2017-04-15 00:10:04 +09:00
parent aa81cb8318
commit 746688274d
1 changed files with 44 additions and 20 deletions

View File

@ -113,6 +113,30 @@ type Toot struct {
Visibility string `json:"visibility"`
}
// Mention hold information for mention.
type Mention struct {
URL string `json:"url"`
Username string `json:"username"`
Acct string `json:"acct"`
ID int64 `json:"id"`
}
// Tag hold information for tag.
type Tag struct {
Name string `json:"name"`
URL string `json:"url"`
}
// Attachment hold information for attachment.
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"`
}
// Status is struct to hold status.
type Status struct {
ID int64 `json:"id"`
@ -122,17 +146,17 @@ type Status struct {
Sensitive bool `json:"sensitive"`
SpoilerText string `json:"spoiler_text"`
Visibility string `json:"visibility"`
Application interface{} `json:"application"`
Application Application `json:"application"`
Account Account `json:"account"`
MediaAttachments []interface{} `json:"media_attachments"`
Mentions []interface{} `json:"mentions"`
Tags []interface{} `json:"tags"`
MediaAttachments []Attachment `json:"media_attachments"`
Mentions []Mention `json:"mentions"`
Tags []Tag `json:"tags"`
URI string `json:"uri"`
Content string `json:"content"`
URL string `json:"url"`
ReblogsCount int64 `json:"reblogs_count"`
FavouritesCount int64 `json:"favourites_count"`
Reblog interface{} `json:"reblog"`
Reblog *Status `json:"reblog"`
Favourited interface{} `json:"favourited"`
Reblogged interface{} `json:"reblogged"`
}