diff options
| author | lost+skunk <[email protected]> | 2024-07-13 21:40:17 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-07-13 21:40:17 +0300 |
| commit | 4d166ad5f98377685a9dd47a0aaed547e67d79ce (patch) | |
| tree | f887e64a5b2ba9784ff48f8f21a5707fdce40411 /deviantion.go | |
| parent | 0a6260b2e026c073f13534dbc882813d3d74b32a (diff) | |
| download | devianter-0.2.0.tar.gz devianter-0.2.0.tar.bz2 devianter-0.2.0.zip | |
Небольшие допилыv0.2.0
Diffstat (limited to 'deviantion.go')
| -rw-r--r-- | deviantion.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/deviantion.go b/deviantion.go index e955b12..2f9410f 100644 --- a/deviantion.go +++ b/deviantion.go @@ -24,6 +24,7 @@ func (t *time) UnmarshalJSON(b []byte) (err error) { type Deviation struct { Title, Url, License string PublishedTime time + ID int `json:"deviationId"` NSFW bool `json:"isMature"` AI bool `json:"isAiGenerated"` @@ -40,6 +41,12 @@ type Deviation struct { Tags []struct { Name string } + OriginalFile struct { + Type string + Width int + Height int + Filesize int + } DescriptionText Text RelatedContent []struct { Deviations []Deviation @@ -89,7 +96,7 @@ func UrlFromMedia(m Media) string { if t.T == "fullview" { url.WriteString(m.BaseUri) if m.BaseUri[len(m.BaseUri)-3:] != "gif" && t.W*t.H < 33177600 { - url.WriteString("/v1/fill/w_") + url.WriteString("/v1/fit/w_") url.WriteString(strconv.Itoa(t.W)) url.WriteString(",h_") url.WriteString(strconv.Itoa(t.H)) |
