Skip to content

Commit 98f9de6

Browse files
feat(api): manual updates
1 parent 49c8193 commit 98f9de6

21 files changed

Lines changed: 63 additions & 63 deletions

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 42
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-d1a3e6dfc45ae832b6b14a0aef25878985c679fa9f48c1470df188b1578ba648.yml
33
openapi_spec_hash: 1d382866fce3284f26d341f112988d9d
4-
config_hash: 54c05a157f2cc730fac9e1df5dc3ca29
4+
config_hash: 29a2351fe2be89392b15719be8bc964f

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ import (
5656

5757
func main() {
5858
client := imagekit.NewClient(
59-
option.WithPrivateAPIKey("My Private API Key"), // defaults to os.LookupEnv("IMAGEKIT_PRIVATE_API_KEY")
60-
option.WithPassword("My Password"), // defaults to os.LookupEnv("OPTIONAL_IMAGEKIT_IGNORES_THIS")
59+
option.WithPrivateKey("My Private Key"), // defaults to os.LookupEnv("IMAGEKIT_PRIVATE_API_KEY")
60+
option.WithPassword("My Password"), // defaults to os.LookupEnv("OPTIONAL_IMAGEKIT_IGNORES_THIS")
6161
)
6262
response, err := client.Files.Upload(context.TODO(), imagekit.FileUploadParams{
6363
File: io.Reader(bytes.NewBuffer([]byte("https://www.example.com/public-url.jpg"))),

accountorigin_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestAccountOriginNewWithOptionalParams(t *testing.T) {
2424
}
2525
client := imagekit.NewClient(
2626
option.WithBaseURL(baseURL),
27-
option.WithPrivateAPIKey("My Private API Key"),
27+
option.WithPrivateKey("My Private Key"),
2828
option.WithPassword("My Password"),
2929
)
3030
_, err := client.Accounts.Origins.New(context.TODO(), imagekit.AccountOriginNewParams{
@@ -60,7 +60,7 @@ func TestAccountOriginUpdateWithOptionalParams(t *testing.T) {
6060
}
6161
client := imagekit.NewClient(
6262
option.WithBaseURL(baseURL),
63-
option.WithPrivateAPIKey("My Private API Key"),
63+
option.WithPrivateKey("My Private Key"),
6464
option.WithPassword("My Password"),
6565
)
6666
_, err := client.Accounts.Origins.Update(
@@ -100,7 +100,7 @@ func TestAccountOriginList(t *testing.T) {
100100
}
101101
client := imagekit.NewClient(
102102
option.WithBaseURL(baseURL),
103-
option.WithPrivateAPIKey("My Private API Key"),
103+
option.WithPrivateKey("My Private Key"),
104104
option.WithPassword("My Password"),
105105
)
106106
_, err := client.Accounts.Origins.List(context.TODO())
@@ -124,7 +124,7 @@ func TestAccountOriginDelete(t *testing.T) {
124124
}
125125
client := imagekit.NewClient(
126126
option.WithBaseURL(baseURL),
127-
option.WithPrivateAPIKey("My Private API Key"),
127+
option.WithPrivateKey("My Private Key"),
128128
option.WithPassword("My Password"),
129129
)
130130
err := client.Accounts.Origins.Delete(context.TODO(), "id")
@@ -148,7 +148,7 @@ func TestAccountOriginGet(t *testing.T) {
148148
}
149149
client := imagekit.NewClient(
150150
option.WithBaseURL(baseURL),
151-
option.WithPrivateAPIKey("My Private API Key"),
151+
option.WithPrivateKey("My Private Key"),
152152
option.WithPassword("My Password"),
153153
)
154154
_, err := client.Accounts.Origins.Get(context.TODO(), "id")

accounturlendpoint_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestAccountURLEndpointNewWithOptionalParams(t *testing.T) {
2424
}
2525
client := imagekit.NewClient(
2626
option.WithBaseURL(baseURL),
27-
option.WithPrivateAPIKey("My Private API Key"),
27+
option.WithPrivateKey("My Private Key"),
2828
option.WithPassword("My Password"),
2929
)
3030
_, err := client.Accounts.URLEndpoints.New(context.TODO(), imagekit.AccountURLEndpointNewParams{
@@ -59,7 +59,7 @@ func TestAccountURLEndpointUpdateWithOptionalParams(t *testing.T) {
5959
}
6060
client := imagekit.NewClient(
6161
option.WithBaseURL(baseURL),
62-
option.WithPrivateAPIKey("My Private API Key"),
62+
option.WithPrivateKey("My Private Key"),
6363
option.WithPassword("My Password"),
6464
)
6565
_, err := client.Accounts.URLEndpoints.Update(
@@ -98,7 +98,7 @@ func TestAccountURLEndpointList(t *testing.T) {
9898
}
9999
client := imagekit.NewClient(
100100
option.WithBaseURL(baseURL),
101-
option.WithPrivateAPIKey("My Private API Key"),
101+
option.WithPrivateKey("My Private Key"),
102102
option.WithPassword("My Password"),
103103
)
104104
_, err := client.Accounts.URLEndpoints.List(context.TODO())
@@ -122,7 +122,7 @@ func TestAccountURLEndpointDelete(t *testing.T) {
122122
}
123123
client := imagekit.NewClient(
124124
option.WithBaseURL(baseURL),
125-
option.WithPrivateAPIKey("My Private API Key"),
125+
option.WithPrivateKey("My Private Key"),
126126
option.WithPassword("My Password"),
127127
)
128128
err := client.Accounts.URLEndpoints.Delete(context.TODO(), "id")
@@ -146,7 +146,7 @@ func TestAccountURLEndpointGet(t *testing.T) {
146146
}
147147
client := imagekit.NewClient(
148148
option.WithBaseURL(baseURL),
149-
option.WithPrivateAPIKey("My Private API Key"),
149+
option.WithPrivateKey("My Private Key"),
150150
option.WithPassword("My Password"),
151151
)
152152
_, err := client.Accounts.URLEndpoints.Get(context.TODO(), "id")

accountusage_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func TestAccountUsageGet(t *testing.T) {
2525
}
2626
client := imagekit.NewClient(
2727
option.WithBaseURL(baseURL),
28-
option.WithPrivateAPIKey("My Private API Key"),
28+
option.WithPrivateKey("My Private Key"),
2929
option.WithPassword("My Password"),
3030
)
3131
_, err := client.Accounts.Usage.Get(context.TODO(), imagekit.AccountUsageGetParams{

asset_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestAssetListWithOptionalParams(t *testing.T) {
2424
}
2525
client := imagekit.NewClient(
2626
option.WithBaseURL(baseURL),
27-
option.WithPrivateAPIKey("My Private API Key"),
27+
option.WithPrivateKey("My Private Key"),
2828
option.WithPassword("My Password"),
2929
)
3030
_, err := client.Assets.List(context.TODO(), imagekit.AssetListParams{

betav2file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestBetaV2FileUploadWithOptionalParams(t *testing.T) {
2727
}
2828
client := imagekit.NewClient(
2929
option.WithBaseURL(baseURL),
30-
option.WithPrivateAPIKey("My Private API Key"),
30+
option.WithPrivateKey("My Private Key"),
3131
option.WithPassword("My Password"),
3232
)
3333
_, err := client.Beta.V2.Files.Upload(context.TODO(), imagekit.BetaV2FileUploadParams{

cacheinvalidation_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestCacheInvalidationNew(t *testing.T) {
2424
}
2525
client := imagekit.NewClient(
2626
option.WithBaseURL(baseURL),
27-
option.WithPrivateAPIKey("My Private API Key"),
27+
option.WithPrivateKey("My Private Key"),
2828
option.WithPassword("My Password"),
2929
)
3030
_, err := client.Cache.Invalidation.New(context.TODO(), imagekit.CacheInvalidationNewParams{
@@ -50,7 +50,7 @@ func TestCacheInvalidationGet(t *testing.T) {
5050
}
5151
client := imagekit.NewClient(
5252
option.WithBaseURL(baseURL),
53-
option.WithPrivateAPIKey("My Private API Key"),
53+
option.WithPrivateKey("My Private Key"),
5454
option.WithPassword("My Password"),
5555
)
5656
_, err := client.Cache.Invalidation.Get(context.TODO(), "requestId")

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func DefaultClientOptions() []option.RequestOption {
3636
}
3737
defaults = append(defaults, option.WithPassword("do_not_set"))
3838
if o, ok := os.LookupEnv("IMAGEKIT_PRIVATE_API_KEY"); ok {
39-
defaults = append(defaults, option.WithPrivateAPIKey(o))
39+
defaults = append(defaults, option.WithPrivateKey(o))
4040
}
4141
if o, ok := os.LookupEnv("OPTIONAL_IMAGEKIT_IGNORES_THIS"); ok {
4242
defaults = append(defaults, option.WithPassword(o))

client_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (t *closureTransport) RoundTrip(req *http.Request) (*http.Response, error)
2828
func TestUserAgentHeader(t *testing.T) {
2929
var userAgent string
3030
client := imagekit.NewClient(
31-
option.WithPrivateAPIKey("My Private API Key"),
31+
option.WithPrivateKey("My Private Key"),
3232
option.WithPassword("My Password"),
3333
option.WithHTTPClient(&http.Client{
3434
Transport: &closureTransport{
@@ -53,7 +53,7 @@ func TestUserAgentHeader(t *testing.T) {
5353
func TestRetryAfter(t *testing.T) {
5454
retryCountHeaders := make([]string, 0)
5555
client := imagekit.NewClient(
56-
option.WithPrivateAPIKey("My Private API Key"),
56+
option.WithPrivateKey("My Private Key"),
5757
option.WithPassword("My Password"),
5858
option.WithHTTPClient(&http.Client{
5959
Transport: &closureTransport{
@@ -91,7 +91,7 @@ func TestRetryAfter(t *testing.T) {
9191
func TestDeleteRetryCountHeader(t *testing.T) {
9292
retryCountHeaders := make([]string, 0)
9393
client := imagekit.NewClient(
94-
option.WithPrivateAPIKey("My Private API Key"),
94+
option.WithPrivateKey("My Private Key"),
9595
option.WithPassword("My Password"),
9696
option.WithHTTPClient(&http.Client{
9797
Transport: &closureTransport{
@@ -125,7 +125,7 @@ func TestDeleteRetryCountHeader(t *testing.T) {
125125
func TestOverwriteRetryCountHeader(t *testing.T) {
126126
retryCountHeaders := make([]string, 0)
127127
client := imagekit.NewClient(
128-
option.WithPrivateAPIKey("My Private API Key"),
128+
option.WithPrivateKey("My Private Key"),
129129
option.WithPassword("My Password"),
130130
option.WithHTTPClient(&http.Client{
131131
Transport: &closureTransport{
@@ -159,7 +159,7 @@ func TestOverwriteRetryCountHeader(t *testing.T) {
159159
func TestRetryAfterMs(t *testing.T) {
160160
attempts := 0
161161
client := imagekit.NewClient(
162-
option.WithPrivateAPIKey("My Private API Key"),
162+
option.WithPrivateKey("My Private Key"),
163163
option.WithPassword("My Password"),
164164
option.WithHTTPClient(&http.Client{
165165
Transport: &closureTransport{
@@ -189,7 +189,7 @@ func TestRetryAfterMs(t *testing.T) {
189189

190190
func TestContextCancel(t *testing.T) {
191191
client := imagekit.NewClient(
192-
option.WithPrivateAPIKey("My Private API Key"),
192+
option.WithPrivateKey("My Private Key"),
193193
option.WithPassword("My Password"),
194194
option.WithHTTPClient(&http.Client{
195195
Transport: &closureTransport{
@@ -213,7 +213,7 @@ func TestContextCancel(t *testing.T) {
213213

214214
func TestContextCancelDelay(t *testing.T) {
215215
client := imagekit.NewClient(
216-
option.WithPrivateAPIKey("My Private API Key"),
216+
option.WithPrivateKey("My Private Key"),
217217
option.WithPassword("My Password"),
218218
option.WithHTTPClient(&http.Client{
219219
Transport: &closureTransport{
@@ -245,7 +245,7 @@ func TestContextDeadline(t *testing.T) {
245245

246246
go func() {
247247
client := imagekit.NewClient(
248-
option.WithPrivateAPIKey("My Private API Key"),
248+
option.WithPrivateKey("My Private Key"),
249249
option.WithPassword("My Password"),
250250
option.WithHTTPClient(&http.Client{
251251
Transport: &closureTransport{

0 commit comments

Comments
 (0)