Skip to content

Commit 85bc8e2

Browse files
committed
add missing Seeds client method
1 parent ec4c62b commit 85bc8e2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: minor
3+
---
4+
5+
# Add missing API client methods.

api/client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ func (c *Client) Seed(ctx context.Context, id vault.SeedID) (SeedResponse, error
8686
return resp, err
8787
}
8888

89+
func (c *Client) Seeds(ctx context.Context, offset, limit int) ([]vault.SeedMeta, error) {
90+
var resp SeedsResponse
91+
err := c.c.GET(ctx, fmt.Sprintf("/seeds?offset=%d&limit=%d", offset, limit), &resp)
92+
return resp.Seeds, err
93+
}
94+
8995
// NewClient creates a new API client.
9096
func NewClient(address, password string) *Client {
9197
return &Client{

0 commit comments

Comments
 (0)