Created
April 27, 2020 10:40
-
-
Save plutov/56eb72d31852807b3e8883e539e38197 to your computer and use it in GitHub Desktop.
api-client-1.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package facest | |
import ( | |
"net/http" | |
"time" | |
) | |
const ( | |
BaseURLV1 = "https://api.facest.io/v1" | |
) | |
type Client struct { | |
BaseURL string | |
apiKey string | |
HTTPClient *http.Client | |
} | |
func NewClient(apiKey string) *Client { | |
return &Client{ | |
BaseURL: BaseURLV1, | |
apiKey: apiKey, | |
HTTPClient: &http.Client{ | |
Timeout: time.Minute, | |
}, | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment