This commit is contained in:
stefanodvx 2025-04-14 13:05:43 +02:00
parent 264c97183e
commit 3faede7b1c
74 changed files with 6228 additions and 1 deletions

62
ext/pinterest/models.go Normal file
View file

@ -0,0 +1,62 @@
package pinterest
type PinResponse struct {
ResourceResponse struct {
Data PinData `json:"data"`
} `json:"resource_response"`
}
type PinData struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Images *Images `json:"images,omitempty"`
Videos *Videos `json:"videos,omitempty"`
StoryPinData *StoryPin `json:"story_pin_data,omitempty"`
Embed *Embed `json:"embed,omitempty"`
}
type Images struct {
Orig *ImageObject `json:"orig"`
}
type ImageObject struct {
URL string `json:"url"`
Width int `json:"width"`
Height int `json:"height"`
}
type Videos struct {
VideoList map[string]*VideoObject `json:"video_list"`
}
type VideoObject struct {
URL string `json:"url"`
Width int64 `json:"width"`
Height int64 `json:"height"`
Duration int64 `json:"duration"`
Thumbnail string `json:"thumbnail"`
}
type StoryPin struct {
Pages []Page `json:"pages"`
}
type Page struct {
Blocks []Block `json:"blocks"`
Image *struct {
Images struct {
Originals *ImageObject `json:"originals"`
} `json:"images"`
} `json:"image,omitempty"`
}
type Block struct {
BlockType int `json:"block_type"`
Video *Videos `json:"video,omitempty"`
}
type Embed struct {
Type string `json:"type"`
Src string `json:"src"`
}