Client for the pixeldrain API. Used by pixeldrain itself for tranferring data between the web UI and API server. And for rendering JSON responses
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
558 B

  1. package pixelapi
  2. import (
  3. "net/url"
  4. "fornaxian.tech/pixeldrain_server/api/restapi/apitype"
  5. )
  6. // GetFilesystemBuckets returns a list of buckets for the user. You need to be
  7. // authenticated
  8. func (p *PixelAPI) GetFilesystemBuckets() (resp []apitype.Bucket, err error) {
  9. return resp, p.jsonRequest("GET", "filesystem", &resp)
  10. }
  11. // GetFilesystemPath opens a filesystem path
  12. func (p *PixelAPI) GetFilesystemPath(path string) (resp apitype.FilesystemPath, err error) {
  13. return resp, p.jsonRequest("GET", "filesystem/"+url.PathEscape(path)+"?stat", &resp)
  14. }