File: client_shared.go

package info (click to toggle)
golang-github-koofr-go-koofrclient 0.0~git20190724.8e5366d-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 136 kB
  • sloc: makefile: 5
file content (25 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package koofrclient

import (
	"net/http"

	"github.com/koofr/go-httpclient"
)

func (c *KoofrClient) Shared() (shared []Shared, err error) {
	d := &struct {
		Files *[]Shared
	}{&shared}

	request := httpclient.RequestData{
		Method:         "GET",
		Path:           "/api/v2/shared",
		ExpectedStatus: []int{http.StatusOK},
		RespEncoding:   httpclient.EncodingJSON,
		RespValue:      &d,
	}

	_, err = c.Request(&request)

	return
}