Skip to content

Commit f8cb896

Browse files
Java dev
1 parent 4c0fdb3 commit f8cb896

73 files changed

Lines changed: 14407 additions & 24914 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
build/
77
codegen.log
88
kls_database.db
9+
10+
image-kit-java-example/resources
11+
image-kit-java-example/src/main/resources/
12+
temp

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 47
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-70c42eda2bee929830b2537f758400a58dded1f1ef5686a286e2469c35a041a0.yml
3-
openapi_spec_hash: cdaeed824e91657b45092765cf55eb42
4-
config_hash: 2a6f67c966b8b3db6f986be4ac23a507
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc%2Fimagekit-c7f578172392bde58bbb72be2a25b9e917529cd07550358c645ce155debf2418.yml
3+
openapi_spec_hash: f0d797a17b1e8e81707517700cd44b13
4+
config_hash: dd05bc22f655304a173260e96c9588b2

README.md

Lines changed: 353 additions & 62 deletions
Large diffs are not rendered by default.

buildSrc/src/main/kotlin/image-kit.java.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ configure<JavaPluginExtension> {
1515

1616
java {
1717
toolchain {
18-
languageVersion.set(JavaLanguageVersion.of(21))
18+
languageVersion.set(JavaLanguageVersion.of(17))
1919
}
2020

2121
sourceCompatibility = JavaVersion.VERSION_1_8

buildSrc/src/main/kotlin/image-kit.kotlin.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repositories {
1212

1313
kotlin {
1414
jvmToolchain {
15-
languageVersion.set(JavaLanguageVersion.of(21))
15+
languageVersion.set(JavaLanguageVersion.of(17))
1616
}
1717

1818
compilerOptions {

image-kit-java-core/src/main/kotlin/com/imagekit/api/client/ImageKitClient.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package com.imagekit.api.client
44

55
import com.imagekit.api.core.ClientOptions
6+
import com.imagekit.api.lib.HelperService
67
import com.imagekit.api.services.blocking.AccountService
78
import com.imagekit.api.services.blocking.AssetService
89
import com.imagekit.api.services.blocking.BetaService
@@ -68,6 +69,8 @@ interface ImageKitClient {
6869

6970
fun webhooks(): WebhookService
7071

72+
fun helper(): HelperService
73+
7174
/**
7275
* Closes this client, relinquishing any underlying resources.
7376
*

image-kit-java-core/src/main/kotlin/com/imagekit/api/client/ImageKitClientAsync.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package com.imagekit.api.client
44

55
import com.imagekit.api.core.ClientOptions
6+
import com.imagekit.api.lib.HelperService
67
import com.imagekit.api.services.async.AccountServiceAsync
78
import com.imagekit.api.services.async.AssetServiceAsync
89
import com.imagekit.api.services.async.BetaServiceAsync
@@ -68,6 +69,8 @@ interface ImageKitClientAsync {
6869

6970
fun webhooks(): WebhookServiceAsync
7071

72+
fun helper(): HelperService
73+
7174
/**
7275
* Closes this client, relinquishing any underlying resources.
7376
*

image-kit-java-core/src/main/kotlin/com/imagekit/api/client/ImageKitClientAsyncImpl.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ package com.imagekit.api.client
44

55
import com.imagekit.api.core.ClientOptions
66
import com.imagekit.api.core.getPackageVersion
7+
import com.imagekit.api.lib.Helper
8+
import com.imagekit.api.lib.HelperService
79
import com.imagekit.api.services.async.AccountServiceAsync
810
import com.imagekit.api.services.async.AccountServiceAsyncImpl
911
import com.imagekit.api.services.async.AssetServiceAsync
@@ -73,6 +75,8 @@ class ImageKitClientAsyncImpl(private val clientOptions: ClientOptions) : ImageK
7375
WebhookServiceAsyncImpl(clientOptionsWithUserAgent)
7476
}
7577

78+
private val helper: Helper by lazy { Helper.create(clientOptions) }
79+
7680
override fun sync(): ImageKitClient = sync
7781

7882
override fun withRawResponse(): ImageKitClientAsync.WithRawResponse = withRawResponse
@@ -98,6 +102,8 @@ class ImageKitClientAsyncImpl(private val clientOptions: ClientOptions) : ImageK
98102

99103
override fun webhooks(): WebhookServiceAsync = webhooks
100104

105+
override fun helper(): HelperService = helper
106+
101107
override fun close() = clientOptions.close()
102108

103109
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :

image-kit-java-core/src/main/kotlin/com/imagekit/api/client/ImageKitClientImpl.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ package com.imagekit.api.client
44

55
import com.imagekit.api.core.ClientOptions
66
import com.imagekit.api.core.getPackageVersion
7+
import com.imagekit.api.lib.Helper
8+
import com.imagekit.api.lib.HelperService
79
import com.imagekit.api.services.blocking.AccountService
810
import com.imagekit.api.services.blocking.AccountServiceImpl
911
import com.imagekit.api.services.blocking.AssetService
@@ -63,6 +65,8 @@ class ImageKitClientImpl(private val clientOptions: ClientOptions) : ImageKitCli
6365

6466
private val webhooks: WebhookService by lazy { WebhookServiceImpl(clientOptionsWithUserAgent) }
6567

68+
private val helper: Helper by lazy { Helper.create(clientOptions) }
69+
6670
override fun async(): ImageKitClientAsync = async
6771

6872
override fun withRawResponse(): ImageKitClient.WithRawResponse = withRawResponse
@@ -88,6 +92,8 @@ class ImageKitClientImpl(private val clientOptions: ClientOptions) : ImageKitCli
8892

8993
override fun webhooks(): WebhookService = webhooks
9094

95+
override fun helper(): HelperService = helper
96+
9197
override fun close() = clientOptions.close()
9298

9399
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :

0 commit comments

Comments
 (0)