Commit 10612b5d authored by Vasiliy Tolstov's avatar Vasiliy Tolstov

try to avoid pagination

Signed-off-by: default avatarVasiliy Tolstov <v.tolstov@selfip.ru>
parent 8f9e9abc
...@@ -200,7 +200,7 @@ func (d DigitalOceanClientV2) CreateSnapshot(id uint, name string) error { ...@@ -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) { ...@@ -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) ...@@ -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
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment