SocialDragon/tumblr/api.go
2020-01-15 23:10:20 +01:00

116 lines
4.5 KiB
Go

package tumblr
// ResponseT defines a Rumblr response
type ResponseT struct {
Meta struct {
Status int `json:"status"`
Msg string `json:"msg"`
} `json:"meta"`
Response []struct {
BlogName string `json:"blog_name"`
ID int64 `json:"id"`
PostURL string `json:"post_url"`
Slug string `json:"slug"`
Type string `json:"type"`
Date string `json:"date"`
Timestamp int `json:"timestamp"`
State string `json:"state"`
Format string `json:"format"`
ReblogKey string `json:"reblog_key"`
Tags []string `json:"tags"`
ShortURL string `json:"short_url"`
Summary string `json:"summary"`
RecommendedSource interface{} `json:"recommended_source"`
RecommendedColor interface{} `json:"recommended_color"`
NoteCount int `json:"note_count"`
Caption string `json:"caption,omitempty"`
Reblog struct {
TreeHTML string `json:"tree_html"`
Comment string `json:"comment"`
} `json:"reblog"`
Trail []struct {
Blog struct {
Name string `json:"name"`
Active bool `json:"active"`
Theme struct {
AvatarShape string `json:"avatar_shape"`
BackgroundColor string `json:"background_color"`
BodyFont string `json:"body_font"`
HeaderBounds int `json:"header_bounds"`
HeaderImage string `json:"header_image"`
HeaderImageFocused string `json:"header_image_focused"`
HeaderImageScaled string `json:"header_image_scaled"`
HeaderStretch bool `json:"header_stretch"`
LinkColor string `json:"link_color"`
ShowAvatar bool `json:"show_avatar"`
ShowDescription bool `json:"show_description"`
ShowHeaderImage bool `json:"show_header_image"`
ShowTitle bool `json:"show_title"`
TitleColor string `json:"title_color"`
TitleFont string `json:"title_font"`
TitleFontWeight string `json:"title_font_weight"`
} `json:"theme"`
ShareLikes bool `json:"share_likes"`
ShareFollowing bool `json:"share_following"`
CanBeFollowed bool `json:"can_be_followed"`
} `json:"blog"`
Post struct {
ID string `json:"id"`
} `json:"post"`
ContentRaw string `json:"content_raw"`
Content string `json:"content"`
IsCurrentItem bool `json:"is_current_item"`
IsRootItem bool `json:"is_root_item"`
} `json:"trail"`
PhotosetLayout string `json:"photoset_layout,omitempty"`
Photos []struct {
Caption string `json:"caption"`
AltSizes []struct {
URL string `json:"url"`
Width int `json:"width"`
Height int `json:"height"`
} `json:"alt_sizes"`
OriginalSize struct {
URL string `json:"url"`
Width int `json:"width"`
Height int `json:"height"`
} `json:"original_size"`
Exif struct {
Camera string `json:"Camera"`
ISO int `json:"ISO"`
Aperture string `json:"Aperture"`
Exposure string `json:"Exposure"`
FocalLength string `json:"FocalLength"`
} `json:"exif"`
} `json:"photos,omitempty"`
CanLike bool `json:"can_like"`
CanReblog bool `json:"can_reblog"`
CanSendInMessage bool `json:"can_send_in_message"`
CanReply bool `json:"can_reply"`
DisplayAvatar bool `json:"display_avatar"`
LinkURL string `json:"link_url,omitempty"`
ImagePermalink string `json:"image_permalink,omitempty"`
Title string `json:"title,omitempty"`
Body string `json:"body,omitempty"`
PermalinkURL string `json:"permalink_url,omitempty"`
HTML5Capable bool `json:"html5_capable,omitempty"`
Video struct {
Youtube struct {
VideoID string `json:"video_id"`
Width int `json:"width"`
Height int `json:"height"`
} `json:"youtube"`
} `json:"video,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
Player []struct {
Width int `json:"width"`
EmbedCode string `json:"embed_code"`
} `json:"player,omitempty"`
VideoType string `json:"video_type,omitempty"`
VideoURL string `json:"video_url,omitempty"`
Duration int `json:"duration,omitempty"`
} `json:"response"`
}