mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-25 10:12:37 +02:00
20 lines
435 B
Go
20 lines
435 B
Go
package piwigotools
|
|
|
|
type Categories []*Category
|
|
|
|
type Category struct {
|
|
Id int `json:"id"`
|
|
Name string `json:"name"`
|
|
ImagesCount int `json:"nb_images"`
|
|
TotalImagesCount int `json:"total_nb_images"`
|
|
Url string `json:"url"`
|
|
}
|
|
|
|
func (c *Categories) Names() []string {
|
|
names := make([]string, len(*c))
|
|
for i, category := range *c {
|
|
names[i] = category.Name
|
|
}
|
|
return names
|
|
}
|