add lists to user home

This commit is contained in:
2018-09-10 22:55:31 +02:00
parent f6bb683cc9
commit 17756b4d13
7 changed files with 53 additions and 17 deletions

View File

@@ -1,5 +1,7 @@
package pixelapi
import "time"
// API error constants
const (
ListNotFoundError = "list_not_found"
@@ -7,22 +9,23 @@ const (
// List information object from the pixeldrain API
type List struct {
Success bool `json:"success"`
ID string `json:"id"`
Title string `json:"title"`
DateCreated int64 `json:"date_created"`
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
}
// ListFile information object from the pixeldrain API
type ListFile struct {
ID string `json:"id"`
DetailHREF string `json:"detail_href"`
FileName string `json:"file_name"`
Description string `json:"description"`
DateCreated int64 `json:"date_created"`
DateLastView int64 `json:"date_last_view"`
ListDescription string `json:"list_description"`
ID string `json:"id"`
DetailHREF string `json:"detail_href"`
FileName string `json:"file_name"`
Description string `json:"description"`
DateCreated time.Time `json:"date_created"`
DateLastView time.Time `json:"date_last_view"`
ListDescription string `json:"list_description"`
}
// GetList get a List from the pixeldrain API. Errors will be available through