mirror of
https://github.com/taigrr/elevenlabs.git
synced 2026-04-02 03:08:57 -07:00
use endpoint built into client
This commit is contained in:
@@ -5,9 +5,18 @@ const apiEndpoint = "https://api.elevenlabs.io"
|
||||
var ErrUnauthorized error
|
||||
|
||||
type Client struct {
|
||||
apiKey string
|
||||
apiKey string
|
||||
endpoint string
|
||||
}
|
||||
|
||||
func New(apiKey string) Client {
|
||||
return Client{apiKey: apiKey}
|
||||
return Client{
|
||||
apiKey: apiKey,
|
||||
endpoint: apiEndpoint,
|
||||
}
|
||||
}
|
||||
|
||||
func (c Client) WithEndpoint(endpoint string) Client {
|
||||
c.endpoint = endpoint
|
||||
return c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user