diff --git a/tools/serpapi/api.go b/tools/serpapi/api.go index 1a7d7ffe..944b71fe 100644 --- a/tools/serpapi/api.go +++ b/tools/serpapi/api.go @@ -12,7 +12,7 @@ type request struct { GoogleDomain string CountryCode string LanguageCode string - ApiKey string + APIKey string } type response struct { @@ -58,7 +58,7 @@ type result struct { func (r *request) Path() (string, error) { urlValues := restclientgo.NewURLValues() urlValues.Add("q", &r.Query) - urlValues.Add("api_key", &r.ApiKey) + urlValues.Add("api_key", &r.APIKey) if r.GoogleDomain != "" { urlValues.Add("google_domain", &r.GoogleDomain) diff --git a/tools/serpapi/serpapi.go b/tools/serpapi/serpapi.go index c524bff5..e4dfb3a8 100644 --- a/tools/serpapi/serpapi.go +++ b/tools/serpapi/serpapi.go @@ -54,7 +54,7 @@ func (t *Tool) WithLanguageCode(languageCode string) *Tool { return t } -func (t *Tool) WithApiKey(apiKey string) *Tool { +func (t *Tool) WithAPIKey(apiKey string) *Tool { t.apiKey = apiKey return t } @@ -77,7 +77,7 @@ func (t *Tool) fn(i Input) Output { GoogleDomain: t.googleDomain, CountryCode: t.countryCode, LanguageCode: t.languageCode, - ApiKey: t.apiKey, + APIKey: t.apiKey, } res := &response{}