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]>
4.2 KiB
4.2 KiB
PersonasApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| botGetPersona | GET /v1/bot/personas/{slug}/detail | Get persona detail including latest version and owner |
| botListPersonaVersions | GET /v1/bot/personas/{slug}/versions | List versions of a persona |
| botListPersonas | GET /v1/bot/personas | List personas (paginated) |
botGetPersona
BotGetPersona200Response botGetPersona(slug)
Get persona detail including latest version and owner
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PersonasApi()
val slug : kotlin.String = slug_example // kotlin.String |
try {
val result : BotGetPersona200Response = apiInstance.botGetPersona(slug)
println(result)
} catch (e: ClientException) {
println("4xx response calling PersonasApi#botGetPersona")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PersonasApi#botGetPersona")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| slug | kotlin.String |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
botListPersonaVersions
BotListPersonaVersions200Response botListPersonaVersions(slug, limit)
List versions of a persona
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PersonasApi()
val slug : kotlin.String = slug_example // kotlin.String |
val limit : kotlin.Int = 56 // kotlin.Int |
try {
val result : BotListPersonaVersions200Response = apiInstance.botListPersonaVersions(slug, limit)
println(result)
} catch (e: ClientException) {
println("4xx response calling PersonasApi#botListPersonaVersions")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PersonasApi#botListPersonaVersions")
e.printStackTrace()
}
Parameters
| slug | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | kotlin.Int | [optional] [default to 20] |
Return type
BotListPersonaVersions200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
botListPersonas
BotListPersonas200Response botListPersonas(sort, limit, cursor)
List personas (paginated)
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = PersonasApi()
val sort : kotlin.String = sort_example // kotlin.String |
val limit : kotlin.Int = 56 // kotlin.Int |
val cursor : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime |
try {
val result : BotListPersonas200Response = apiInstance.botListPersonas(sort, limit, cursor)
println(result)
} catch (e: ClientException) {
println("4xx response calling PersonasApi#botListPersonas")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling PersonasApi#botListPersonas")
e.printStackTrace()
}
Parameters
| sort | kotlin.String| | [optional] [default to Sort.updated] [enum: updated, downloads, stars, created] | | limit | kotlin.Int| | [optional] [default to 50] |
| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | java.time.OffsetDateTime | [optional] |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json