Skip to content

Commit

Permalink
add support for fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pluja committed Dec 6, 2023
1 parent 3ca3c76 commit 1b6a313
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ func (c *Client) List(collection string, params ParamsList) (ResponseList[map[st
if params.Expand != "" {
request.SetQueryParam("expand", params.Expand)
}
if params.Fields != "" {
request.SetQueryParam("fields", params.Fields)
}

resp, err := request.Get(c.url + "/api/collections/{collection}/records")
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions params.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type ParamsList struct {
Filters string
Sort string
Expand string
Fields string

hackResponseRef any //hack for collection list
}

0 comments on commit 1b6a313

Please sign in to comment.