Commit Graph

104 Commits

Author SHA1 Message Date
bryanl af5057f05f Add checks for arguments
Adds checks to determine if the request will actually be valid by prefiltering invalid defaults (less than 0, empty strings, nils). The goal of this change is eliminate unnecceary API calls.
2015-09-25 14:44:20 -05:00
Bryan Liles 7712039e0d Merge pull request #64 from digitalocean/correct-spellings
It's DigitalOcean
2015-09-18 09:45:56 -04:00
bryanl 32ac48f00c It's DigitalOcean 2015-09-18 09:10:59 -04:00
Bryan Liles 0d77b009a8 Merge pull request #62 from timfallmk/oauth-dependency-fix
Update oauth2 dependency
2015-08-02 21:54:07 -04:00
Bryan Liles 804140ecd1 Merge pull request #61 from mseshachalam/patch-2
removed named return
2015-08-02 21:53:12 -04:00
Tim a9b9f88df7 Refactor to use static tokens
Signed-off-by: Tim <timfall@gmail.com>
2015-07-31 19:34:38 -04:00
root 402c82c164 Update oauth2 dependency
Signed-off-by: root <root@tester.midokura.sexy>
2015-07-31 18:43:25 -04:00
Seshachalam Malisetti d89542dd60 removed named return 2015-07-16 09:16:00 +05:30
Bryan Liles e2a34fae5e Merge pull request #58 from zyegfryed/feature/add-image-created-at
Add Created attribute to Image
2015-06-17 16:01:41 -04:00
Sébastien Fievet 20712022a4 Add Created attribute to Image 2015-06-17 19:07:09 +02:00
Bryan Liles a503f0ad74 Merge pull request #57 from digitalocean/bugfix/more-unexported-interfaces
remove unexported items from interfaces
2015-06-03 09:28:30 -04:00
bryanl 62b1f69e1a remove unexported items from interfaces 2015-06-03 00:22:08 -04:00
Bryan Liles 71d516bd90 Merge pull request #56 from digitalocean/bugfix/remove-unexported-from-da-interface
Remove unexported item from interface
2015-06-02 07:40:04 -04:00
bryanl df64c561b0 Remove unexported item from interface
Removing unexported `doAction` from DropletActionsService interface because it makes DropletActionsService impossible to mock.
2015-06-02 07:26:53 -04:00
Bryan Liles 09b3c10a45 Merge pull request #55 from masayukioguni/remove_printf
Remove fmt.Printf from domains.go
2015-06-01 19:28:05 -04:00
masayuki_oguni e5e4a6d533 Remove fmt.Printf from domains.go 2015-06-02 07:58:10 +09:00
Bryan Liles d681ba7af2 Merge pull request #52 from digitalocean/refactor/roots
Standardize on returning objects, not the json roots.
2015-06-01 14:38:51 -04:00
bryanl de59235b17 updating documentation for godo 2015-06-01 13:34:27 -04:00
Phillip Baker 1df42b98f6 Standardize on returning objects, not the json roots.
Let's be nice to our consumers - they don't care about the root, they care about the object. Even when the user needs access to the Links, that's accessible via the resp variable returned.
2015-06-01 10:47:19 -04:00
Bryan Liles bbf01e0d69 Merge pull request #54 from digitalocean/pagination-with-multiple-options
Don't drop existing query keys
2015-06-01 07:39:26 -06:00
bryanl b4e33ee3ae Don't drop existing query keys
When adding options to a path, don't drop existing keys. This will enable image pagination when there is a type key to work. The bug was trying to addOptions to an existing path with query values. Previously if a path `/path?type=alpha` was passed, key `page=2` would be appeneded, but `type=alpha` would be dropped.
2015-05-29 15:10:21 -07:00
Mac Browning e5677d69e8 Merge pull request #53 from bclermont/master
Fix doc for Delete
2015-05-28 11:27:43 +07:00
Bruno Clermont 4d71c27dae Fix doc for Delete 2015-05-28 12:17:17 +08:00
Bryan Liles 5165705424 Merge pull request #51 from digitalocean/update/readme
Update to oauth2 example.
2015-05-27 14:05:24 -04:00
Phillip Baker 80e737c091 Update to oauth2 example. 2015-05-22 21:01:35 -04:00
Bryan Liles 8eb611fd0c Merge pull request #49 from digitalocean/add-size-slug-to-droplet
Add size slug to droplet
2015-05-11 16:34:53 -04:00
bryanl 5d38c50b0a Add size slug to droplet
Adds missing size slug to droplets. This should take care of the
issue raised in #21.
2015-05-11 14:26:52 -04:00
Bryan Liles 5d297a5939 Merge pull request #47 from masayukioguni/added_param_to_size
Added parameters to size
2015-05-04 12:05:56 -04:00
masayuki_oguni 90449108b5 Added transfer to size
Added Available to size
2015-05-03 21:11:41 +09:00
Bryan Liles f0db3dd790 Merge pull request #45 from rightscale/feature/request_completion_callback
Add optional API request completion callback to client.
2015-05-02 19:19:33 -04:00
Raphael Simon c4ca5889d2 Add optional API request completion callback to client.
This makes it possible for consumers of the package to debug API calls made to the DO APIs.

Usage:

client.OnRequestCompleted(func(req *http.Request, resp *http.Response) {
	// ... e.g. use httputil.DumpRequest / httputil.DumpResponse
})
2015-05-02 10:29:09 -07:00
Bryan Liles 36d12666fd Merge pull request #46 from digitalocean/add-wait-example
Add example for WaitForActive()
2015-04-30 16:40:56 -04:00
bryanl f964c24213 Add example for WaitForActive() 2015-04-30 16:16:16 -04:00
Antoine Grondin 43bfe8800f Merge pull request #42 from rightscale/feature/complete_images
Add missing APIs to Images service.
2015-04-22 22:51:38 -04:00
Raphael Simon fc8ecd5bc6 Add missing APIs to Images service.
The following were added:

* Images.ListDistribution() for GET /v2/images?type=distribution
* Images.ListApplication() for GET /v2/images?type=application
* Images.ListUser() for GET /v2/images?private=true
* Images.GetByID() for GET /v2/images/12345
* Images.GetBySlug() for GET /v2/images/ubuntu
* Images.Update() for PUT /v2/images/12345
* Images.Delete() for DELETE /v2/images/12345
2015-04-22 17:55:01 -07:00
Phill Baker 6230768632 Merge pull request #41 from rightscale/feature/droplet_listings
Add Droplet service Listing requests.
2015-04-22 18:32:03 -04:00
Bryan Liles 0017aa5e88 Merge pull request #44 from rightscale/feature/complete_droplet_actions
Add missing droplet actions.
2015-04-22 11:56:24 -04:00
Bryan Liles 90214be142 Merge pull request #43 from rightscale/feature/update_keys
Add support for key updates
2015-04-22 11:55:03 -04:00
Raphael Simon acbcf2a70a Add missing droplet actions.
This includes the following DropletActions service methods:
DisableBackups, PasswordReset, RebuildByImageID(), RebuildByImageSlug(), ChangeKernel(), EnableIPv6(), EnablePrivateNetworking() and Upgrade().
2015-04-21 13:16:35 -07:00
Mac Browning a78b339c02 Merge pull request #36 from andrewsomething/master
Add support for the /v2/account endpoint.
2015-04-21 14:23:28 -04:00
Raphael Simon 268107e222 Add support for key updates:
* Keys.UpdateByID() for PUT /v2/account/keys/12345
* Keys.UpdateByFingerprint() for PUT /v2/account/keys/<fingerprint>
2015-04-21 10:39:54 -07:00
Raphael Simon 2a6cda7911 Rename Droplets.ListKernels() and co. to Droplets.Kernels()
so that the naming convention is consistent with the Images service where "ListFoo()" means "list images of type foo" rather than "list foos of the image".
2015-04-20 18:32:49 -07:00
Raphael Simon df0702b9e2 Add Droplet service Listing requests.
Includes ListKernels, ListSnapshots, ListBackups, ListActions and ListNeighbors corresponding to
the GET "/v2/droplets/:id/kernels" etc. APIs.
2015-04-20 15:27:41 -07:00
Phill Baker 8dc1f54d1a Merge pull request #38 from brycereitano/bug/user_data_omitempty
Omit an empty value for user data to serialize properly.
2015-04-13 18:28:54 -04:00
Bryce Reitano 107613d25b Omit an empty value for user data to serialize properly. 2015-04-12 18:44:47 -06:00
Andrew Starr-Bochicchio 9a460e3683 Break long line. 2015-04-06 18:11:52 -04:00
Andrew Starr-Bochicchio ccc93aa250 Add support for the /v2/account endpoint. 2015-04-06 13:09:21 -04:00
Phill Baker 006aa44e95 Merge pull request #34 from mattva01/mattva01-patch-1
Added godo to DropletCreateImage in create example
2015-03-23 21:22:35 -04:00
Matthew Gallagher a033ea36ac Added godo to DropletCreateImage in create example 2015-03-23 19:42:38 -04:00
Bryan Liles 4a70bc6049 Merge pull request #33 from digitalocean/remove-implements-check
Remove testing Implements
2015-03-23 07:37:21 -04:00