Skip to content

Instantly share code, notes, and snippets.

@plutov
Created April 27, 2020 10:40
Show Gist options
  • Save plutov/56eb72d31852807b3e8883e539e38197 to your computer and use it in GitHub Desktop.
Save plutov/56eb72d31852807b3e8883e539e38197 to your computer and use it in GitHub Desktop.
api-client-1.go
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