mirror of
https://git.macaw.me/skunky/devianter.git
synced 2025-04-27 19:45:08 +03:00
крымские наработки
This commit is contained in:
parent
cec788554a
commit
efa4b86a67
5 changed files with 75 additions and 53 deletions
|
@ -35,21 +35,21 @@ type Deviation struct {
|
|||
Stats struct {
|
||||
Favourites, Views, Downloads int
|
||||
}
|
||||
Media media
|
||||
Media Media
|
||||
Extended struct {
|
||||
Tags []struct {
|
||||
Name string
|
||||
}
|
||||
DescriptionText text
|
||||
DescriptionText Text
|
||||
RelatedContent []struct {
|
||||
Deviations []Deviation
|
||||
}
|
||||
}
|
||||
TextContent text
|
||||
TextContent Text
|
||||
}
|
||||
|
||||
// её выпердыши
|
||||
type media struct {
|
||||
type Media struct {
|
||||
BaseUri string
|
||||
Token []string
|
||||
Types []struct {
|
||||
|
@ -58,7 +58,7 @@ type media struct {
|
|||
}
|
||||
}
|
||||
|
||||
type text struct {
|
||||
type Text struct {
|
||||
Excerpt string
|
||||
Html struct {
|
||||
Markup, Type string
|
||||
|
@ -83,7 +83,7 @@ type Post struct {
|
|||
}
|
||||
|
||||
// преобразование урла в правильный
|
||||
func UrlFromMedia(m media) string {
|
||||
func UrlFromMedia(m Media) string {
|
||||
var url strings.Builder
|
||||
for _, t := range m.Types {
|
||||
if t.T == "fullview" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue