getUserByUsernameOrEmail
Call Signature
getUserByUsernameOrEmail(
variables
,init
?):Promise
<TypedResponse
<Response
>>
Defined in: src/queries/getUserByUsernameOrEmail.ts:54
Get KAID by username or email.
Parameters
variables
init?
RequestInit
Returns
Promise
<TypedResponse
<Response
>>
Link
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(
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