This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
e621-sdk-go/pkg/e621/model/post.go
2023-11-15 13:21:13 +01:00

94 lines
3.3 KiB
Go

package model
type PostID int64
type PostResponse struct {
Post Post `json:"post"`
Posts []Post `json:"posts"`
}
type Post struct {
ID PostID `json:"id" csv:"id"`
CreatedAt string `json:"created_at" csv:"created_at"`
UpdatedAt string `json:"updated_at" csv:"updated_at"`
File File `json:"file" csv:"file"`
Preview Preview `json:"preview" csv:"-"`
Sample Sample `json:"sample" csv:"-"`
Score Score `json:"score" csv:"score"`
Tags Tags `json:"tags" csv:"tag_string"`
LockedTags []interface{} `json:"locked_tags" csv:"locked_tags"`
ChangeSeq int64 `json:"change_seq" csv:"change_seq"`
Flags Flags `json:"flags" csv:"-"`
Rating string `json:"rating" csv:"rating"`
FavCount int64 `json:"fav_count" csv:"fav_count"`
Sources []string `json:"sources" csv:"source"`
Pools []interface{} `json:"pools" csv:"-"`
Relationships Relationships `json:"relationships" csv:"-"`
ApproverID interface{} `json:"approver_id" csv:"approver_id"`
UploaderID int64 `json:"uploader_id" csv:"uploader_id"`
Description string `json:"description" csv:"description"`
CommentCount int64 `json:"comment_count" csv:"comment_count"`
IsFavorited bool `json:"is_favorited" csv:"-"`
HasNotes bool `json:"has_notes" csv:"-"`
Duration interface{} `json:"duration" csv:"duration"`
}
type File struct {
Width int64 `json:"width" csv:"image_width"`
Height int64 `json:"height" csv:"image_height"`
EXT string `json:"ext" csv:"file_ext"`
Size int64 `json:"size" csv:"file_size"`
Md5 string `json:"md5" csv:"md5"`
URL string `json:"url" csv:"-"`
}
type Flags struct {
Pending bool `json:"pending" csv:"is_pending"`
Flagged bool `json:"flagged" csv:"is_flagged"`
NoteLocked bool `json:"note_locked" csv:"is_note_locked"`
StatusLocked bool `json:"status_locked" csv:"is_status_locked"`
RatingLocked bool `json:"rating_locked" csv:"is_rating_locked"`
Deleted bool `json:"deleted" csv:"is_deleted"`
}
type Preview struct {
Width int64 `json:"width" csv:"-"`
Height int64 `json:"height" csv:"-"`
URL string `json:"url" csv:"-"`
}
type Relationships struct {
ParentID interface{} `json:"parent_id" csv:"parent_id"`
HasChildren bool `json:"has_children" csv:"-"`
HasActiveChildren bool `json:"has_active_children" csv:"-"`
Children []interface{} `json:"children" csv:"-"`
}
type Sample struct {
Has bool `json:"has" csv:"-"`
Height int64 `json:"height" csv:"-"`
Width int64 `json:"width" csv:"-"`
URL string `json:"url" csv:"-"`
Alternates Alternates `json:"alternates" csv:"-"`
}
type Alternates struct {
}
type Score struct {
Up int64 `json:"up" csv:"up_score"`
Down int64 `json:"down" csv:"down_score"`
Total int64 `json:"total" csv:"-"`
}
type Tags struct {
General []string `json:"general" csv:"-"`
Artist []string `json:"artist" csv:"-"`
Copyright []string `json:"copyright" csv:"-"`
Character []string `json:"character" csv:"-"`
Species []string `json:"species" csv:"-"`
Invalid []string `json:"invalid" csv:"-"`
Meta []string `json:"meta" csv:"-"`
Lore []string `json:"lore" csv:"-"`
}