Commit 4d166ad5f9
Unsigned
Layout: unified · split
deviantion.go +8 −1
| @@ -24,6 +24,7 @@ func (t *time) UnmarshalJSON(b []byte) (err error) { | ||
| 24 | 24 | type Deviation struct { |
| 25 | 25 | Title, Url, License string |
| 26 | 26 | PublishedTime time |
| 27 | ID int `json:"deviationId"` | |
| 27 | 28 | |
| 28 | 29 | NSFW bool `json:"isMature"` |
| 29 | 30 | AI bool `json:"isAiGenerated"` |
| @@ -40,6 +41,12 @@ type Deviation struct { | ||
| 40 | 41 | Tags []struct { |
| 41 | 42 | Name string |
| 42 | 43 | } |
| 44 | OriginalFile struct { | |
| 45 | Type string | |
| 46 | Width int | |
| 47 | Height int | |
| 48 | Filesize int | |
| 49 | } | |
| 43 | 50 | DescriptionText Text |
| 44 | 51 | RelatedContent []struct { |
| 45 | 52 | Deviations []Deviation |
| @@ -89,7 +96,7 @@ func UrlFromMedia(m Media) string { | ||
| 89 | 96 | if t.T == "fullview" { |
| 90 | 97 | url.WriteString(m.BaseUri) |
| 91 | 98 | if m.BaseUri[len(m.BaseUri)-3:] != "gif" && t.W*t.H < 33177600 { |
| 92 | url.WriteString("/v1/fill/w_") | |
| 99 | url.WriteString("/v1/fit/w_") | |
| 93 | 100 | url.WriteString(strconv.Itoa(t.W)) |
| 94 | 101 | url.WriteString(",h_") |
| 95 | 102 | url.WriteString(strconv.Itoa(t.H)) |
user-group.go +2
| @@ -79,7 +79,9 @@ type Gallery struct { | ||
| 79 | 79 | HasMore bool |
| 80 | 80 | Results []struct { |
| 81 | 81 | FolderId int |
| 82 | Size int | |
| 82 | 83 | Name string |
| 84 | Thumb Deviation | |
| 83 | 85 | } |
| 84 | 86 | } |
| 85 | 87 | |