Add a tailored version of prepareRequest().
authorOllivier Robert <roberto@keltia.net>
Thu, 06 Apr 2017 23:37:26 +0200
changeset 26 dbc7755fbcca
parent 25 9414cadcb717
child 27 15abafa6cd90
Add a tailored version of prepareRequest().
gondole.go
--- a/gondole.go	Thu Apr 06 23:36:00 2017 +0200
+++ b/gondole.go	Thu Apr 06 23:37:26 2017 +0200
@@ -17,7 +17,6 @@
 // prepareRequest insert all pre-defined stuff
 func (g *Gondole) prepareRequest(what string) (req rest.Request) {
 	endPoint := APIEndpoint + fmt.Sprintf("/%s/", what)
-	key, ok := HasAPIKey()
 
 	// Add at least one option, the APIkey if present
 	hdrs := make(map[string]string)
@@ -26,11 +25,6 @@
 	// Insert our sig
 	hdrs["User-Agent"] = fmt.Sprintf("Gondole/%s", APIVersion)
 
-	// Insert key
-	if ok {
-		opts["key"] = key
-	}
-
 	req = rest.Request{
 		BaseURL:     endPoint,
 		Headers:     hdrs,