Commit Graph

25 Commits

Author SHA1 Message Date
Sunny Beatteay 96f3a269f0 storage: add support for spaces cdn 2018-08-22 09:41:21 -04:00
Iheanyi Ekechukwu e6249e5059 Remove support for Go 1.6 (#166)
* Move DoRequest* to godo package with stdlib context

* Use stdlib context package in place of godo context.

* Remove Go 1.6 from TravisCI configuration.

* Use stdlib context in util and tests instead of godo context.

* Add in Go 1.8, 1.9, and 1.10 to TravisCI configuration.

* Put 1.10 in quotes.
2018-05-08 16:24:29 -04:00
Joonas Bergius ac5e3a015f Follow User-Agent header field recommendations 2017-09-22 17:30:06 -06:00
Guus van Weelden 9e24e26f6b use http.MethodX instead of "GET"/"POST"/"DELETE" 2017-07-02 13:55:56 +02:00
akutz 8ed9e9ea6c Portable Go Context Usage
This patch updates the godo package to use a portable Go context -- a
Context that works with Go versions prior to Go 1.7 as well as Go 1.7
and onwards.
2017-04-07 15:32:33 -05:00
Antoine Grondin dc14e4b04d add context.Context to all calls 2017-02-23 14:25:29 -05:00
Erick Guevara a7b77d4c06 adding tests for godo.SetBaseURL() to check BaseURL field and handle parse url errors 2017-01-12 00:50:14 -06:00
Carlos Villela 7c9bf15691 Adds support for creating droplets with monitoring (#117) 2016-12-21 23:05:53 -05:00
Mike Chittenden 82ae4350ef Add Tags attribute to droplet create 2016-11-09 10:57:33 -05:00
Bryan Liles cacf7fa36e Merge pull request #100 from tbalthazar/issue-99
Changing the User Agent doesn't work as expected
2016-06-14 11:25:00 -04:00
Thomas Balthazar cb325e7136 Changing the User Agent doesn't work as expected
Fixes #99
2016-06-14 17:17:36 +02:00
Thomas Balthazar 22de7c48d5 Make sure Client.New() init the different services
Fixes #97
2016-06-14 16:37:22 +02:00
Antoine Grondin 8897364455 remove JSON invalid encoding test
> Go 1.7 adds support for maps using keys with integer types: the
> encoding uses a quoted decimal representation as the JSON key.

in: https://tip.golang.org/doc/go1.7, under encoding/json
2016-06-09 16:38:35 -04:00
bryanl 2db8830c36 create functional option based initializer for Client 2016-04-24 12:54:55 -04:00
bryanl de59235b17 updating documentation for godo 2015-06-01 13:34:27 -04: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
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
Bryce Reitano 107613d25b Omit an empty value for user data to serialize properly. 2015-04-12 18:44:47 -06:00
Bryan Liles 4a70bc6049 Merge pull request #33 from digitalocean/remove-implements-check
Remove testing Implements
2015-03-23 07:37:21 -04:00
bryanl 14a4b3f281 Remove testing Implements
Make adherenence to interface a compile type rather than a test time check.
2015-03-21 15:42:48 -04:00
bryanl f1424cedf5 Add missing error checks
Adds missing error checks to godo. Ensures calls to Client.Do and json decoding are evaluated when neccessary.
2015-03-21 15:21:49 -04:00
Phillip Baker f1ccbcd46f Add image/ssh key structs for explicit type on droplet create.
Closes #22
2015-03-21 14:52:14 -04:00
bryanl 6fc81f4c7a Add all options to droplet create request
Added:

backups, ipv6, private_networking, user_data
2014-10-16 09:36:50 -04:00
bryanl 96accbf5e9 Update to current API spec
* Allow requesting pages in lists by number
* Add tooling to allow examination of page links if they exist
* Add domain management CRUD
2014-09-08 20:36:11 -04:00
bryanl 4b5588d885 Services are interfaces
* Converted services to interfaces to make testing with them
in downstream projects easier to do.
* Removed testify dependency.
2014-09-04 16:22:37 -04:00
Renamed from doapi_test.go (Browse further)