diff --git a/README.md b/README.md index 421e5f0..86423d5 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ In your go files, simply use: import "github.com/snowplow-devops/redash-client-go/redash" ``` -Then next `go mod tidy` or `go test` invocation will automatically -populate your `go.mod` with the last redash-client-go release, now -[![Version](https://img.shields.io/github/tag/snowplow-devops/redash-client-go.svg)](https://github.com/snowplow-devops/redash-client-go/releases). -(Note you can use `go mod vendor` to vendor your dependencies.) +Then next `go mod tidy` or `go test` invocation will automatically populate your `go.mod` with the last redash-client-go release, now [![Version](https://img.shields.io/github/tag/snowplow-devops/redash-client-go.svg)](https://github.com/snowplow-devops/redash-client-go/releases). + +_Note_: you can use `go mod vendor` to vendor your dependencies. From there, you will need to setup a new client in order to access API methods: + ``` config := redash.Config{ RedashURI: "https://acme.com/", diff --git a/redash/users.go b/redash/users.go index 8669a96..a1b2610 100644 --- a/redash/users.go +++ b/redash/users.go @@ -78,10 +78,12 @@ type UserUpdatePayload struct { } //GetUsers returns a paginated list of users -func (c *Client) GetUsers() (*UserList, error) { +func (c *Client) GetUsers(page, pageSize int) (*UserList, error) { path := "/api/users" query := url.Values{} + query.Add("page", strconv.Itoa(page)) + query.Add("page_size", strconv.Itoa(pageSize)) response, err := c.get(path, query) if err != nil {