Skip to main content
Glama
UserApi.ts1.79 kB
/* tslint:disable */ /* eslint-disable */ /** * recraft.ai external api * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import type { User, } from '../models/index'; import { UserFromJSON, UserToJSON, } from '../models/index'; /** * */ export class UserApi extends runtime.BaseAPI { /** * Get current user info */ async getCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<User>> { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; const tokenString = await token("auth0", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } const response = await this.request({ path: `/v1/users/me`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue)); } /** * Get current user info */ async getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<User> { const response = await this.getCurrentUserRaw(initOverrides); return await response.value(); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/recraft-ai/mcp-recraft-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server