@@ -39,7 +39,31 @@ client.hris. # APIs specific to the HRIS Category
39
39
40
40
## Usage
41
41
42
- ## Create Link Token
42
+ ### Async Client
43
+ The SDK also exports an async client so that you can make non-blocking
44
+ calls to our API. This client leverages ` httpx ` 's AsyncClient, and exports all the same functions and functionality of the sync client.
45
+
46
+ ``` python
47
+ import asyncio
48
+ from merge.client import AsyncMerge
49
+
50
+ client = AsyncMerge(
51
+ api_key = " <YOUR_API_KEY>" ,
52
+ account_token = " <YOUR_ACCOUNT_TOKEN>" )
53
+
54
+ async def main () -> None :
55
+ await merge_client.ats.link_token.create(
56
+ end_user_email_address = " [email protected] " ,
57
+ end_user_organization_name = " acme" ,
58
+ end_user_origin_id = " 1234" ,
59
+ categories = [CategoriesEnum.ATS ],
60
+ link_expiry_mins = 30 ,
61
+ )
62
+
63
+ asyncio.run(main())
64
+ ```
65
+
66
+ ### Create Link Token
43
67
44
68
``` python
45
69
import merge
@@ -61,7 +85,7 @@ link_token_response = merge_client.ats.link_token.create(
61
85
print (" Created link token" , link_token_response.link_token)
62
86
```
63
87
64
- ## Get Employee
88
+ ### Get Employee
65
89
66
90
``` python
67
91
import merge
@@ -75,7 +99,7 @@ employee = merge_client.hris.employees.retrieve(
75
99
id = " 0958cbc6-6040-430a-848e-aafacbadf4ae" )
76
100
```
77
101
78
- ## Get Candidate
102
+ ### Get Candidate
79
103
80
104
``` python
81
105
import merge
@@ -89,7 +113,7 @@ candidate = merge_client.ats.candidates.retrieve(
89
113
id = " 521b18c2-4d01-4297-b451-19858d07c133" )
90
114
```
91
115
92
- ## Filter Candidate
116
+ ### Filter Candidate
93
117
94
118
``` python
95
119
import merge
@@ -105,7 +129,7 @@ candidates_response = merge_client.ats.candidates.list(
105
129
print (candidates_response.results)
106
130
```
107
131
108
- ## Get Contact
132
+ ### Get Contact
109
133
110
134
``` python
111
135
import merge
@@ -119,7 +143,7 @@ contact = merge_client.accounting.contacts.retrieve(
119
143
id = " c640b80b-fac9-409f-aa19-1f9221aec445" )
120
144
```
121
145
122
- ## Create Ticket
146
+ ### Create Ticket
123
147
124
148
``` python
125
149
import merge
0 commit comments