-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdriver.py
More file actions
99 lines (78 loc) · 2.07 KB
/
driver.py
File metadata and controls
99 lines (78 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env python3
# -*- coding: utf8 -*-
from .client import Client
from .endpoints import Documents
from .endpoints import Metadata
from .endpoints import Onboarding
from .endpoints import Payroll
from .endpoints import People
from .endpoints import Reports
from .endpoints import Tasks
from .endpoints import TimeOff
class Driver:
def __init__(self, api_token):
self.client = Client(api_token=api_token)
@property
def documents(self):
"""
Api endpoint for documents
Returns:
Instance of :class:`~endpoints.Documents.Documents`
"""
return Documents(self.client)
@property
def metadata(self):
"""
Api endpoint for metadata
Returns:
Instance of :class:`~endpoints.Metadata.Metadata`
"""
return Metadata(self.client)
@property
def onboarding(self):
"""
Api endpoint for onboarding
Returns:
Instance of :class:`~endpoints.Onboarding.Onboarding`
"""
return Onboarding(self.client)
@property
def payroll(self):
"""
Api endpoint for payroll
Returns:
Instance of :class:`~endpoints.Payroll.Payroll`
"""
return Payroll(self.client)
@property
def people(self):
"""
Api endpoint for people
Returns:
Instance of :class:`~endpoints.People.People`
"""
return People(self.client)
@property
def reports(self):
"""
Api endpoint for reports
Returns:
Instance of :class:`~endpoints.Reports.Reports`
"""
return Reports(self.client)
@property
def tasks(self):
"""
Api endpoint for tasks
Returns:
Instance of :class:`~endpoints.Tasks.Tasks`
"""
return Tasks(self.client)
@property
def time_off(self):
"""
Api endpoint for time off
Returns:
Instance of :class:`~endpoints.TimeOff.TimeOff`
"""
return TimeOff(self.client)