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