add api to get session
This commit is contained in:
@@ -15,6 +15,8 @@ import type {
|
||||
SessionCreateData,
|
||||
SessionCreateResponses,
|
||||
SessionCreateErrors,
|
||||
SessionGetData,
|
||||
SessionGetResponses,
|
||||
SessionDeleteData,
|
||||
SessionDeleteResponses,
|
||||
SessionInitData,
|
||||
@@ -202,6 +204,16 @@ class Session extends _HeyApiClient {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get session
|
||||
*/
|
||||
public get<ThrowOnError extends boolean = false>(options: Options<SessionGetData, ThrowOnError>) {
|
||||
return (options.client ?? this._client).get<SessionGetResponses, unknown, ThrowOnError>({
|
||||
url: "/session/{sessionID}",
|
||||
...options,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a session and all its data
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user