-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgallery.go
35 lines (30 loc) · 1.05 KB
/
gallery.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package deviantart
import (
"github.com/dghubble/sling"
"github.com/google/uuid"
)
type Gallery struct {
FolderID uuid.UUID `json:"folderid"`
Parent uuid.UUID `json:"parent,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
// Content count per each gallery folder. This field is only presented if
// calculate_size param is true.
Size int64 `json:"size,omitempty"`
Thumb *Deviation `json:"thumb,omitempty"`
PremiumFolderData *PremiumFolderData `json:"premium_folder_data,omitempty"`
HasSubfolders bool `json:"has_subfolders"`
Subfolders []Gallery `json:"subfolders,omitempty"`
Deviations []Deviation `json:"deviations,omitempty"`
}
type GalleryService struct {
sling *sling.Sling
*FoldersService[Gallery]
}
func newGalleryService(sling *sling.Sling) *GalleryService {
base := sling.Path("gallery/")
return &GalleryService{
sling: base,
FoldersService: newFoldersService[Gallery](base.New()),
}
}