1.0.3 • Published 1 year ago

@technical_user/api v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Installation

Using npm

$ npm i -g npm
$ npm i @technical_user/api

Usage

const api = new Api()

constructor:

    constructor(apiURL = 'http://localhost', port?: string) 

interface:

interface IApi {
  get(endPoint: string, headers: Headers, refrechCallback: () => Promise<Response>): Promise<ApiResponse>;
  delete(endPoint: string, body: any, headers: Headers, refrechCallback: () => Promise<Response>): Promise<ApiResponse>;
  post(endPoint: string, body: any, headers: Headers, refrechCallback: () => Promise<Response>): Promise<ApiResponse>;
  put(endPoint: string, body: any, headers: Headers, refrechCallback: () => Promise<Response>): Promise<ApiResponse>;
  patch(endPoint: string, body: any, headers: Headers, refrechCallback: () => Promise<Response>): Promise<ApiResponse>;
}

interface RefreshJson extends Partial<Response> {
  accessToken: string;
  refreshtoken: string;
}
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago