diff options
| author | lost+skunk <[email protected]> | 2024-06-05 14:32:40 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-06-05 14:32:40 +0300 |
| commit | 9b850886656bb2ecf192e6d9df63ea07d175de06 (patch) | |
| tree | 342e0ab5a0bab961f3496be3ac14fe9909a3b977 /deviantion.go | |
| parent | 66ab740d7fec430d97f69ab0ed52ba0f01973d46 (diff) | |
| download | devianter-9b850886656bb2ecf192e6d9df63ea07d175de06.tar.gz devianter-9b850886656bb2ecf192e6d9df63ea07d175de06.tar.bz2 devianter-9b850886656bb2ecf192e6d9df63ea07d175de06.zip | |
User implementation and particaly groups
Diffstat (limited to 'deviantion.go')
| -rw-r--r-- | deviantion.go | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/deviantion.go b/deviantion.go index 1f6644c..9803855 100644 --- a/deviantion.go +++ b/deviantion.go @@ -21,10 +21,14 @@ func (t *time) UnmarshalJSON(b []byte) (err error) { // самая главная структура для поста type deviantion struct { - Title, Url, License string - PublishedTime time - IsMature, IsAiGenerated, IsDailyDeviation bool - Author struct { + Title, Url, License string + PublishedTime time + + NSFW bool `json:"isMature"` + AI bool `json:"isAiGenerated"` + DD bool `json:"isDailyDeviation"` + + Author struct { Username string } Stats struct { @@ -54,11 +58,13 @@ type media struct { } type text struct { - Html struct { + Excerpt string + Html struct { Markup, Type string } } +// структура поста type Deviantion struct { Deviation deviantion Comments struct { @@ -73,7 +79,6 @@ type Deviantion struct { } IMG, Desctiption string - Recomendations []deviantion } // для работы функции нужно ID поста и имя пользователя. @@ -98,7 +103,7 @@ func Deviation(id string, user string) Deviantion { // базовая обработка описания txt := st.Deviation.TextContent.Html.Markup - if len(txt) > 0 && txt[0:1] == "{" { + if len(txt) > 0 && txt[1] == 125 { var description struct { Blocks []struct { Text string |
