try to avoid pagination
Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
parent
8f9e9abca1
commit
10612b5d89
|
@ -200,7 +200,7 @@ func (d DigitalOceanClientV2) CreateSnapshot(id uint, name string) error {
|
||||||
func (d DigitalOceanClientV2) Images() ([]Image, error) {
|
func (d DigitalOceanClientV2) Images() ([]Image, error) {
|
||||||
res := ImagesResp{}
|
res := ImagesResp{}
|
||||||
|
|
||||||
err := NewRequestV2(d, "v2/images", "GET", nil, &res)
|
err := NewRequestV2(d, "v2/images?per_page=200", "GET", nil, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ func (d DigitalOceanClientV2) Image(slug_or_name_or_id string) (Image, error) {
|
||||||
// Returns all available regions.
|
// Returns all available regions.
|
||||||
func (d DigitalOceanClientV2) Regions() ([]Region, error) {
|
func (d DigitalOceanClientV2) Regions() ([]Region, error) {
|
||||||
res := RegionsResp{}
|
res := RegionsResp{}
|
||||||
err := NewRequestV2(d, "v2/regions", "GET", nil, &res)
|
err := NewRequestV2(d, "v2/regions?per_page=200", "GET", nil, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ func (d DigitalOceanClientV2) Region(slug_or_name_or_id string) (Region, error)
|
||||||
// Returns all available sizes.
|
// Returns all available sizes.
|
||||||
func (d DigitalOceanClientV2) Sizes() ([]Size, error) {
|
func (d DigitalOceanClientV2) Sizes() ([]Size, error) {
|
||||||
res := SizesResp{}
|
res := SizesResp{}
|
||||||
err := NewRequestV2(d, "v2/sizes", "GET", nil, &res)
|
err := NewRequestV2(d, "v2/sizes?per_page=200", "GET", nil, &res)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue