Skip to content

Commit

Permalink
added list instance query params (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddymko committed Jan 5, 2022
1 parent 502a084 commit 042c358
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion listOptions.go
@@ -1,7 +1,15 @@
package govultr

// ListOptions are the available fields that can be used with pagination
// ListOptions are the available query params
type ListOptions struct {
// These query params are used for all list calls that support pagination
PerPage int `url:"per_page,omitempty"`
Cursor string `url:"cursor,omitempty"`

// These three query params are currently used for the list instance call
// These may be extended to other list calls
// https://www.vultr.com/api/#operation/list-instances
MainIP string `url:"main_ip,omitempty"`
Label string `url:"label,omitempty"`
Tag string `url:"tag,omitempty"`
}

0 comments on commit 042c358

Please sign in to comment.