UNPKG

openblox

Version:

Roblox API Wrapper For Both Classic And OpenCloud APIs.

49 lines (48 loc) 2.48 kB
import type { Identifier } from "typeforge"; import type { UserInfoData } from "./oauth.types"; /** * Gets user information from the current access token. * @endpoint GET /v1/userinfo * * @example const { data:userInfo } = await OAuthApi.userInfo.bind({ oauthToken: "SENSITIVE_INFO" })() * @exampleData {"sub":"45348281","name":"Mighty","nickname":"Mighty","preferred_username":"MightyPart","created_at":1373701800,"profile":"https://www.roblox.com/users/45348281/profile","picture":"https://tr.rbxcdn.com/30DAY-AvatarHeadshot-11BD4BBC67E3F95A4F4BED256CFB4591-Png/150/150/AvatarHeadshot/Png/noFilter"} * @exampleRawBody {"sub":"45348281","name":"Mighty","nickname":"Mighty","preferred_username":"MightyPart","created_at":1373701800,"profile":"https://www.roblox.com/users/45348281/profile","picture":"https://tr.rbxcdn.com/30DAY-AvatarHeadshot-11BD4BBC67E3F95A4F4BED256CFB4591-Png/150/150/AvatarHeadshot/Png/noFilter"} */ export declare const userInfo: import("../../apiGroup/apiGroup.types").CallApiMethod<Record<any, any>, { method: import("../../../utils/utils.types").RestMethod; path: `/${string}`; name: string; searchParams?: string | Record<string, any> | undefined; headers?: Record<string, any> | undefined; body?: string | number | Record<string, any> | undefined; formData?: FormData | undefined; applyFieldMask?: boolean | undefined; pathToPoll?: ((rawData: UserInfoData) => string) | undefined; getCursorsFn?: ((rawData: { sub: Identifier; name: string; nickname: string; preferred_username: string; created_at: number; profile: `https://www.roblox.com/users/${number}/profile`; picture: `https://${string}`; }) => [previous: import("../../apiGroup/apiGroup.types").Cursor, next: import("../../apiGroup/apiGroup.types").Cursor]) | undefined; "\uD83D\uDD12__PRIVATE_RAW_DATA"?: { sub: Identifier; name: string; nickname: string; preferred_username: string; created_at: number; profile: `https://www.roblox.com/users/${number}/profile`; picture: `https://${string}`; } | undefined; "\uD83D\uDD12__PRIVATE_FORMATTED_DATA"?: { sub: Identifier; name: string; nickname: string; preferred_username: string; created_at: number; profile: `https://www.roblox.com/users/${number}/profile`; picture: `https://${string}`; } | undefined; }, false>;