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]>
6.5 KiB
TemplatesApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| autoListTemplates | GET /v1/auto/templates | List flow templates |
| flowGetTemplate | GET /v1/flow/templates/{id} | Get a template by id |
| flowListTemplates | GET /v1/flow/templates | List flow templates |
| templatesGetTemplate | GET /v1/templates/{slug} | One template by slug |
| templatesListTemplates | GET /v1/templates | List the starter-kit catalog |
autoListTemplates
kotlin.Any autoListTemplates()
List flow templates
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TemplatesApi()
try {
val result : kotlin.Any = apiInstance.autoListTemplates()
println(result)
} catch (e: ClientException) {
println("4xx response calling TemplatesApi#autoListTemplates")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TemplatesApi#autoListTemplates")
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
flowGetTemplate
FlowTemplate flowGetTemplate(id)
Get a template by id
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TemplatesApi()
val id : kotlin.String = id_example // kotlin.String |
try {
val result : FlowTemplate = apiInstance.flowGetTemplate(id)
println(result)
} catch (e: ClientException) {
println("4xx response calling TemplatesApi#flowGetTemplate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TemplatesApi#flowGetTemplate")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
flowListTemplates
kotlin.Any flowListTemplates(pieces, tags)
List flow templates
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TemplatesApi()
val pieces : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
val tags : kotlin.collections.List<kotlin.String> = // kotlin.collections.List<kotlin.String> |
try {
val result : kotlin.Any = apiInstance.flowListTemplates(pieces, tags)
println(result)
} catch (e: ClientException) {
println("4xx response calling TemplatesApi#flowListTemplates")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TemplatesApi#flowListTemplates")
e.printStackTrace()
}
Parameters
| pieces | kotlin.collections.List<kotlin.String>| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| tags | kotlin.collections.List<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
templatesGetTemplate
TemplatesTemplate templatesGetTemplate(slug)
One template by slug
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TemplatesApi()
val slug : kotlin.String = slug_example // kotlin.String |
try {
val result : TemplatesTemplate = apiInstance.templatesGetTemplate(slug)
println(result)
} catch (e: ClientException) {
println("4xx response calling TemplatesApi#templatesGetTemplate")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TemplatesApi#templatesGetTemplate")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| slug | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
templatesListTemplates
TemplatesListTemplates200Response templatesListTemplates()
List the starter-kit catalog
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = TemplatesApi()
try {
val result : TemplatesListTemplates200Response = apiInstance.templatesListTemplates()
println(result)
} catch (e: ClientException) {
println("4xx response calling TemplatesApi#templatesListTemplates")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling TemplatesApi#templatesListTemplates")
e.printStackTrace()
}
Parameters
This endpoint does not need any parameter.
Return type
TemplatesListTemplates200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json