Skip to main content

getUserByUsernameOrEmail

Call Signature

getUserByUsernameOrEmail(variables, init?): Promise<TypedResponse<Response>>

Defined in: src/queries/getUserByUsernameOrEmail.ts:54

Get KAID by username or email.

Parameters

variables

Variables

init?

RequestInit

Returns

Promise<TypedResponse<Response>>

Reference

Examples

Simple usage without error handling:

const response = await queries.getUserByUsernameOrEmail({
username: 'sal'
})
const json = await response.json()
const kaid = json.data.user?.kaid

Similarly, get KAID by email:

const response = await queries.getUserByUsernameOrEmail({
email: '[email protected]'
})
const json = await response.json()
const kaid = json.data.user?.kaid

Call Signature

getUserByUsernameOrEmail(username, init?): Promise<TypedResponse<Response>>

Defined in: src/queries/getUserByUsernameOrEmail.ts:67

Parameters

username

string

init?

RequestInit

Returns

Promise<TypedResponse<Response>>

Example

Alternative usage by username:

const response = await queries.getUserByUsernameOrEmail('sal')
const json = await response.json()
const kaid = json.data.user?.kaid

Call Signature

getUserByUsernameOrEmail(email, init?): Promise<TypedResponse<Response>>

Defined in: src/queries/getUserByUsernameOrEmail.ts:80

Parameters

email

`${string}@${string}.${string}`

init?

RequestInit

Returns

Promise<TypedResponse<Response>>

Example

Similarly, by email:

const response = await queries.getUserByUsernameOrEmail('[email protected]')
const json = await response.json()
const kaid = json.data.user?.kaid