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]>
7.3 KiB
AccountAPIApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| cloudApiControllerGetAccount | GET /v1/cloud/get-account | Api Controller Get Account |
| cloudApiControllerSignin | POST /v1/cloud/signin | Api Controller Signin |
| cloudApiControllerSignout | POST /v1/cloud/signout | Api Controller Signout |
| nexusGetAccount | GET /v1/nexus/get-account | get Account |
| nexusSignin | POST /v1/nexus/signin | signin |
| nexusSignout | POST /v1/nexus/signout | signout |
cloudApiControllerGetAccount
kotlin.Any cloudApiControllerGetAccount()
Api Controller Get Account
get account
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountAPIApi()
try {
val result : kotlin.Any = apiInstance.cloudApiControllerGetAccount()
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountAPIApi#cloudApiControllerGetAccount")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountAPIApi#cloudApiControllerGetAccount")
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
cloudApiControllerSignin
kotlin.Any cloudApiControllerSignin(code, state)
Api Controller Signin
sign in
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountAPIApi()
val code : kotlin.String = code_example // kotlin.String | code of account
val state : kotlin.String = state_example // kotlin.String | state of account
try {
val result : kotlin.Any = apiInstance.cloudApiControllerSignin(code, state)
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountAPIApi#cloudApiControllerSignin")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountAPIApi#cloudApiControllerSignin")
e.printStackTrace()
}
Parameters
| code | kotlin.String| code of account | |
| Name | Type | Description | Notes |
|---|---|---|---|
| state | kotlin.String | state of account |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
cloudApiControllerSignout
CloudControllersResponse cloudApiControllerSignout()
Api Controller Signout
sign out
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountAPIApi()
try {
val result : CloudControllersResponse = apiInstance.cloudApiControllerSignout()
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountAPIApi#cloudApiControllerSignout")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountAPIApi#cloudApiControllerSignout")
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
nexusGetAccount
kotlin.Any nexusGetAccount()
get Account
Get the current account
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountAPIApi()
try {
val result : kotlin.Any = apiInstance.nexusGetAccount()
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountAPIApi#nexusGetAccount")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountAPIApi#nexusGetAccount")
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
nexusSignin
kotlin.Any nexusSignin(code, state)
signin
Sign in
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountAPIApi()
val code : kotlin.String = code_example // kotlin.String | Authorization code
val state : kotlin.String = state_example // kotlin.String | OAuth state
try {
val result : kotlin.Any = apiInstance.nexusSignin(code, state)
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountAPIApi#nexusSignin")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountAPIApi#nexusSignin")
e.printStackTrace()
}
Parameters
| code | kotlin.String| Authorization code | |
| Name | Type | Description | Notes |
|---|---|---|---|
| state | kotlin.String | OAuth state |
Return type
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
nexusSignout
NexusResponse nexusSignout()
signout
Sign out
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = AccountAPIApi()
try {
val result : NexusResponse = apiInstance.nexusSignout()
println(result)
} catch (e: ClientException) {
println("4xx response calling AccountAPIApi#nexusSignout")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling AccountAPIApi#nexusSignout")
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