mirror of
https://github.com/hanzo-kt/sdk.git
synced 2026-10-30 20:43:57 +00:00
Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
3.6 KiB
3.6 KiB
BucketsApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| s3CreateBucket | PUT /v1/s3/{bucket} | Create a bucket |
| s3DeleteBucket | DELETE /v1/s3/{bucket} | Delete a bucket |
| s3ListBuckets | GET /v1/s3/ | List all buckets |
s3CreateBucket
s3CreateBucket(bucket)
Create a bucket
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = BucketsApi()
val bucket : kotlin.String = my-models // kotlin.String |
try {
apiInstance.s3CreateBucket(bucket)
} catch (e: ClientException) {
println("4xx response calling BucketsApi#s3CreateBucket")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BucketsApi#s3CreateBucket")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bucket | kotlin.String |
Return type
null (empty response body)
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
s3DeleteBucket
s3DeleteBucket(bucket)
Delete a bucket
Bucket must be empty before deletion.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = BucketsApi()
val bucket : kotlin.String = bucket_example // kotlin.String |
try {
apiInstance.s3DeleteBucket(bucket)
} catch (e: ClientException) {
println("4xx response calling BucketsApi#s3DeleteBucket")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BucketsApi#s3DeleteBucket")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| bucket | kotlin.String |
Return type
null (empty response body)
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
s3ListBuckets
S3ListBuckets200Response s3ListBuckets()
List all buckets
Returns a list of all buckets owned by the authenticated user.
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = BucketsApi()
try {
val result : S3ListBuckets200Response = apiInstance.s3ListBuckets()
println(result)
} catch (e: ClientException) {
println("4xx response calling BucketsApi#s3ListBuckets")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BucketsApi#s3ListBuckets")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json