Wim Brand
4 years ago
8 changed files with 232 additions and 29 deletions
-
29pixelapi/admin.go
-
56pixelapi/file.go
-
50pixelapi/filesystem.go
-
23pixelapi/list.go
-
9pixelapi/misc.go
-
22pixelapi/patreon.go
-
30pixelapi/subscription.go
-
42pixelapi/user.go
@ -1,8 +1,27 @@ |
|||
package pixelapi |
|||
|
|||
import "fornaxian.tech/pixeldrain_server/api/restapi/apitype" |
|||
import ( |
|||
"time" |
|||
) |
|||
|
|||
// ListInfo information object from the pixeldrain API
|
|||
type ListInfo struct { |
|||
Success bool `json:"success"` |
|||
ID string `json:"id"` |
|||
Title string `json:"title"` |
|||
DateCreated time.Time `json:"date_created"` |
|||
FileCount int `json:"file_count"` |
|||
Files []ListFile `json:"files"` |
|||
} |
|||
|
|||
// ListFile information object from the pixeldrain API
|
|||
type ListFile struct { |
|||
DetailHREF string `json:"detail_href"` |
|||
Description string `json:"description"` |
|||
FileInfo `json:""` |
|||
} |
|||
|
|||
// GetListID get a List from the pixeldrain API
|
|||
func (p *PixelAPI) GetListID(id string) (resp apitype.ListInfo, err error) { |
|||
func (p *PixelAPI) GetListID(id string) (resp ListInfo, err error) { |
|||
return resp, p.jsonRequest("GET", "list/"+id, &resp) |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue