Per-project admin key auth, drop ProjectID; MIT license; go 1.21
This commit is contained in:
@@ -9,7 +9,6 @@ const DefaultBaseURL = "https://api.rudder.build"
|
||||
|
||||
type Config struct {
|
||||
APIKey string
|
||||
ProjectID string
|
||||
BaseURL string
|
||||
Timeout time.Duration
|
||||
HTTPClient *http.Client
|
||||
@@ -27,9 +26,6 @@ func New(config Config) (*Client, error) {
|
||||
if config.APIKey == "" {
|
||||
return nil, &APIError{Code: ErrorCodeInvalidOptions, Message: "APIKey is required"}
|
||||
}
|
||||
if config.ProjectID == "" {
|
||||
return nil, &APIError{Code: ErrorCodeInvalidOptions, Message: "ProjectID is required"}
|
||||
}
|
||||
|
||||
if config.BaseURL == "" {
|
||||
config.BaseURL = DefaultBaseURL
|
||||
@@ -44,7 +40,6 @@ func New(config Config) (*Client, error) {
|
||||
transport := &transport{
|
||||
baseURL: config.BaseURL,
|
||||
apiKey: config.APIKey,
|
||||
projectID: config.ProjectID,
|
||||
httpClient: config.HTTPClient,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user