Add bandwidth counter to file viewer

This commit is contained in:
2019-03-26 20:53:19 +01:00
parent 19067a5616
commit b659ac383a
10 changed files with 46 additions and 31 deletions

View File

@@ -18,6 +18,7 @@ type FileInfo struct {
Name string `json:"name"`
Size uint64 `json:"size"`
Views int64 `json:"views"`
BandwidthUsed uint64 `json:"bandwidth_used"`
DateUpload time.Time `json:"date_upload"`
DateLastView time.Time `json:"date_last_view"`
MimeType string `json:"mime_type"`

View File

@@ -19,13 +19,14 @@ type List struct {
// ListFile information object from the pixeldrain API
type ListFile struct {
ID string `json:"id"`
DetailHREF string `json:"detail_href"`
Name string `json:"name"`
Description string `json:"description"`
DateCreated time.Time `json:"date_created"`
DateLastView time.Time `json:"date_last_view"`
Views int64 `json:"views"`
ID string `json:"id"`
DetailHREF string `json:"detail_href"`
Name string `json:"name"`
Description string `json:"description"`
DateCreated time.Time `json:"date_created"`
DateLastView time.Time `json:"date_last_view"`
Views int64 `json:"views"`
BandwidthUsed uint64 `json:"bandwidth_used"`
}
// GetList get a List from the pixeldrain API. Errors will be available through