@idfy/sdk
Version:
Node.js SDK for Idfy REST API
17 lines (16 loc) • 648 B
TypeScript
/// <reference types="node" />
export default abstract class IdfyBaseService {
private readonly clientId?;
private readonly clientSecret?;
private readonly scopes?;
private oauthToken;
constructor();
constructor(clientId: string, clientSecret: string, scopes: any[]);
protected get<T>(url: string): Promise<T>;
protected getBuffer(url: string): Promise<Buffer>;
protected post<T>(url: string, body?: any): Promise<T>;
protected patch<T>(url: string, body?: any): Promise<T>;
protected put<T>(url: string, body?: any): Promise<T>;
protected delete(url: string): Promise<void>;
private getToken;
}