2.3.8 • Published 9 months ago

@gcgov/apiservice v2.3.8

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Api Service

Installation

npm install @gcgov/apiservice

Example Usage

//MyApiService.js
import {ApiService,ApiConfig} from "@gcgov/apiservice"

const config = new ApiConfig(
	'https://www.myapi.com/',      //base url for the api
	'XDEBUG_SESSION=PHPSTORM',     //url parameters to be added to every request
	true,                          //api requires authentication
	async () => {                  //method to get and auto refresh the api access token
		return await yourGetAccessTokenFn();
	}
)

class MyApiService extends ApiService {

	//add custom methods here, if required
    
}

export default new MyApiService( config )
2.3.0

11 months ago

2.2.0

11 months ago

2.3.2

11 months ago

2.3.3

11 months ago

2.3.6

10 months ago

2.3.5

10 months ago

2.3.8

9 months ago

2.3.7

10 months ago

2.1.0

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.5

2 years ago

1.2.0

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago