diff --git a/fastly/token.go b/fastly/token.go index 71b8cca0b..8e32866d7 100644 --- a/fastly/token.go +++ b/fastly/token.go @@ -54,8 +54,13 @@ func (s tokensByName) Less(i, j int) bool { return s[i].Name < s[j].Name } +// ListTokensInput is used as input to the ListTokens function. +type ListTokensInput struct { + // For backward compatibility. +} + // ListTokens retrieves all resources. -func (c *Client) ListTokens() ([]*Token, error) { +func (c *Client) ListTokens(i *ListTokensInput) ([]*Token, error) { resp, err := c.Get("/tokens", nil) if err != nil { return nil, err diff --git a/fastly/token_test.go b/fastly/token_test.go index c12eb19f3..049a2ca94 100644 --- a/fastly/token_test.go +++ b/fastly/token_test.go @@ -8,7 +8,7 @@ func TestClient_ListTokens(t *testing.T) { var tokens []*Token var err error record(t, "tokens/list", func(c *Client) { - tokens, err = c.ListTokens() + tokens, err = c.ListTokens(&ListTokensInput{}) }) if err != nil { t.Fatal(err)