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]>
4.7 KiB
ListApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| kvListPop | POST /v1/kv/list/{key}/pop | Pop from list |
| kvListPush | POST /v1/kv/list/{key}/push | Push to list |
| kvListRange | GET /v1/kv/list/{key} | Get list range |
kvListPop
KvListPop200Response kvListPop(key, namespace, kvListPopRequest)
Pop from list
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ListApi()
val key : kotlin.String = key_example // kotlin.String |
val namespace : kotlin.String = namespace_example // kotlin.String |
val kvListPopRequest : KvListPopRequest = // KvListPopRequest |
try {
val result : KvListPop200Response = apiInstance.kvListPop(key, namespace, kvListPopRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling ListApi#kvListPop")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ListApi#kvListPop")
e.printStackTrace()
}
Parameters
| key | kotlin.String| | | | namespace | kotlin.String| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| kvListPopRequest | KvListPopRequest | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
kvListPush
KvListPush200Response kvListPush(key, kvListPushRequest, namespace)
Push to list
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ListApi()
val key : kotlin.String = key_example // kotlin.String |
val kvListPushRequest : KvListPushRequest = // KvListPushRequest |
val namespace : kotlin.String = namespace_example // kotlin.String |
try {
val result : KvListPush200Response = apiInstance.kvListPush(key, kvListPushRequest, namespace)
println(result)
} catch (e: ClientException) {
println("4xx response calling ListApi#kvListPush")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ListApi#kvListPush")
e.printStackTrace()
}
Parameters
| key | kotlin.String| | | | kvListPushRequest | KvListPushRequest| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| namespace | kotlin.String | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
kvListRange
KvListRange200Response kvListRange(key, start, stop, namespace)
Get list range
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = ListApi()
val key : kotlin.String = key_example // kotlin.String |
val start : kotlin.Int = 56 // kotlin.Int |
val stop : kotlin.Int = 56 // kotlin.Int |
val namespace : kotlin.String = namespace_example // kotlin.String |
try {
val result : KvListRange200Response = apiInstance.kvListRange(key, start, stop, namespace)
println(result)
} catch (e: ClientException) {
println("4xx response calling ListApi#kvListRange")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling ListApi#kvListRange")
e.printStackTrace()
}
Parameters
| key | kotlin.String| | | | start | kotlin.Int| | [optional] [default to 0] | | stop | kotlin.Int| | [optional] [default to -1] |
| Name | Type | Description | Notes |
|---|---|---|---|
| namespace | kotlin.String | [optional] |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json