diff --git a/action.go b/action.go index e19493b9..1ca5904e 100644 --- a/action.go +++ b/action.go @@ -33,7 +33,7 @@ type actionsRoot struct { } type actionRoot struct { - Event Action `json:"action"` + Event *Action `json:"action"` } // Action represents a DigitalOcean Action @@ -92,7 +92,7 @@ func (s *ActionsServiceOp) Get(id int) (*Action, *Response, error) { return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func (a Action) String() string { diff --git a/droplet_actions.go b/droplet_actions.go index c01ba36a..e3e7c2dc 100644 --- a/droplet_actions.go +++ b/droplet_actions.go @@ -256,7 +256,7 @@ func (s *DropletActionsServiceOp) doAction(id int, request *ActionRequest) (*Act return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func (s *DropletActionsServiceOp) doActionByTag(tag string, request *ActionRequest) (*Action, *Response, error) { @@ -281,7 +281,7 @@ func (s *DropletActionsServiceOp) doActionByTag(tag string, request *ActionReque return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } // Get an action for a particular droplet by id. @@ -321,7 +321,7 @@ func (s *DropletActionsServiceOp) get(path string) (*Action, *Response, error) { return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } diff --git a/floating_ips_actions.go b/floating_ips_actions.go index f435384e..bd6fce20 100644 --- a/floating_ips_actions.go +++ b/floating_ips_actions.go @@ -64,7 +64,7 @@ func (s *FloatingIPActionsServiceOp) doAction(ip string, request *ActionRequest) return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func (s *FloatingIPActionsServiceOp) get(path string) (*Action, *Response, error) { @@ -79,7 +79,7 @@ func (s *FloatingIPActionsServiceOp) get(path string) (*Action, *Response, error return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func (s *FloatingIPActionsServiceOp) list(path string) ([]Action, *Response, error) { diff --git a/image_actions.go b/image_actions.go index 2d053856..4c322b3e 100644 --- a/image_actions.go +++ b/image_actions.go @@ -41,7 +41,7 @@ func (i *ImageActionsServiceOp) Transfer(imageID int, transferRequest *ActionReq return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } // Get an action for a particular image by id. @@ -67,5 +67,5 @@ func (i *ImageActionsServiceOp) Get(imageID, actionID int) (*Action, *Response, return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } diff --git a/images.go b/images.go index 96894f88..d5c298da 100644 --- a/images.go +++ b/images.go @@ -45,7 +45,7 @@ type ImageUpdateRequest struct { } type imageRoot struct { - Image Image + Image *Image } type imagesRoot struct { @@ -125,7 +125,7 @@ func (s *ImagesServiceOp) Update(imageID int, updateRequest *ImageUpdateRequest) return nil, resp, err } - return &root.Image, resp, err + return root.Image, resp, err } // Delete an image. @@ -161,7 +161,7 @@ func (s *ImagesServiceOp) get(ID interface{}) (*Image, *Response, error) { return nil, resp, err } - return &root.Image, resp, err + return root.Image, resp, err } // Helper method for listing images diff --git a/keys.go b/keys.go index 8dc50f8a..913471a9 100644 --- a/keys.go +++ b/keys.go @@ -45,7 +45,7 @@ type keysRoot struct { } type keyRoot struct { - SSHKey Key `json:"ssh_key"` + SSHKey *Key `json:"ssh_key"` } func (s Key) String() string { @@ -96,7 +96,7 @@ func (s *KeysServiceOp) get(path string) (*Key, *Response, error) { return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // GetByID gets a Key by id @@ -136,7 +136,7 @@ func (s *KeysServiceOp) Create(createRequest *KeyCreateRequest) (*Key, *Response return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // UpdateByID updates a key name by ID. @@ -161,7 +161,7 @@ func (s *KeysServiceOp) UpdateByID(keyID int, updateRequest *KeyUpdateRequest) ( return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // UpdateByFingerprint updates a key name by fingerprint. @@ -186,7 +186,7 @@ func (s *KeysServiceOp) UpdateByFingerprint(fingerprint string, updateRequest *K return nil, resp, err } - return &root.SSHKey, resp, err + return root.SSHKey, resp, err } // Delete key using a path diff --git a/regions.go b/regions.go index e44e8bcd..506810bf 100644 --- a/regions.go +++ b/regions.go @@ -30,7 +30,7 @@ type regionsRoot struct { } type regionRoot struct { - Region Region + Region *Region } func (r Region) String() string { diff --git a/storage_actions.go b/storage_actions.go index 73aca899..00d234f4 100644 --- a/storage_actions.go +++ b/storage_actions.go @@ -93,7 +93,7 @@ func (s *StorageActionsServiceOp) doAction(volumeID string, request *ActionReque return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func (s *StorageActionsServiceOp) get(path string) (*Action, *Response, error) { @@ -108,7 +108,7 @@ func (s *StorageActionsServiceOp) get(path string) (*Action, *Response, error) { return nil, resp, err } - return &root.Event, resp, err + return root.Event, resp, err } func (s *StorageActionsServiceOp) list(path string) ([]Action, *Response, error) {