|
1 | | -# example-api-client |
| 1 | +# hailey-api-client |
2 | 2 |
|
3 | | -**ExampleApiClient** is a third party [Example API](https://example.com/docs/) client for NodeJS. It is a wrapper around an API client that has been [automatically generated](https://www.npmjs.com/package/swagger-typescript-api) using the [OpenAPI schema](https://example.com/openapi.json) provided by Example. |
| 3 | +**HaileyApiClient** is a third party [Hailey API](https://api.haileyhr.app/docs/) client for NodeJS. It is a wrapper around an API client that has been [automatically generated](https://www.npmjs.com/package/swagger-typescript-api) using the [OpenAPI schema](https://api.haileyhr.app/docs/v1/docs.json) provided by Hailey. |
4 | 4 |
|
5 | 5 | ## Installation |
6 | 6 |
|
7 | 7 | Add to project's package.json: |
8 | 8 |
|
9 | 9 | ``` |
10 | | -npm install @rantalainen/example-api-client |
| 10 | +npm install @rantalainen/hailey-api-client |
11 | 11 | ``` |
12 | 12 |
|
13 | 13 | ### Import |
14 | 14 |
|
15 | 15 | ```javascript |
16 | | -import { ExampleApiClient } from '@rantalainen/example-api-client'; |
| 16 | +import { HaileyApiClient } from '@rantalainen/hailey-api-client'; |
17 | 17 | ``` |
18 | 18 |
|
19 | 19 | ## Setup client with options |
20 | 20 |
|
21 | | -In order to obtain an API key, please contact Example Support. An API key is needed to access all API functions. |
| 21 | +In order to obtain an API key, please contact Hailey Support. An API key is needed to access all API functions. |
22 | 22 |
|
23 | 23 | ```javascript |
24 | | -const example = new ExampleApiClient( |
| 24 | +const hailey = new HaileyApiClient( |
25 | 25 | { |
26 | | - apiKey: 'api_key' |
| 26 | + accessToken: 'accessToken' |
27 | 27 | }, |
28 | 28 | { |
29 | | - baseURL: 'https://dev.example.com' |
| 29 | + baseURL: 'https://api.demo.haileyhr.app/' |
30 | 30 | } |
31 | 31 | ); |
| 32 | + |
| 33 | +const response = await hailey.api.employees.employeesList(); |
32 | 34 | ``` |
33 | 35 |
|
34 | | -Available methods can be found in the [API documentation](https://example.com/docs/). |
| 36 | +Available methods can be found in the [API documentation](https://api.haileyhr.app/docs/). |
35 | 37 |
|
36 | 38 | ## Resources |
37 | 39 |
|
38 | | -- Example: https://example.com/ |
39 | | -- Example Developer Guide: https://example.com/docs/ |
| 40 | +- Hailey HR: https://haileyhr.com/ |
| 41 | +- Hailey HR API Guide: https://docs.haileyhr.com/ |
| 42 | +- Hailey HR Integration Docs: https://docs.haileyhr.com/integrations/ |
0 commit comments