UNPKG

typerinth

Version:

A TypeScript library for interacting with the Modrinth API.

17 lines (16 loc) 764 B
import { URL } from 'url'; import { FetchMethod, Route } from '../Route'; import CacheManager from '../../util/CacheManager'; import { GetTokenResponse } from '../../interfaces/auth'; import { RequestBody } from '../../util/requestbody'; export default class GetTokenRoute extends Route<GetTokenResponse> { private readonly code; private readonly clientId; private readonly redirectUri; constructor(baseUrl: URL, ua: string | undefined, cacheManager: CacheManager, authorization: string | undefined, code: string, clientId: string, redirectUri: string); getCacheKey(): string | null; getUrl(): URL; protected getFetchMethod(): FetchMethod; protected getFetchBody(): RequestBody | null; parseData(data: any): GetTokenResponse; }