-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathtableau_server_rest.py
executable file
·268 lines (239 loc) · 17.4 KB
/
tableau_server_rest.py
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
from .tableau_rest_api import *
#
# This is equivalent to TableauRestApiConnection but with an extra layer of organization, by attaching
# most of the functions as sub-objects
#
class TableauServerRest(TableauRestApiBase):
def __init__(self, server: str, username: str, password: str,
site_content_url: Optional[str] = "", api_version: str = "3.2"):
TableauRestApiBase.__init__(self, server, username, password, site_content_url,
api_version=api_version)
self.rest_api_base = self
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods = ExtractMethods(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.groups: GroupMethods = GroupMethods(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods = SubscriptionMethods(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.workbooks: WorkbookMethods = WorkbookMethods(self.rest_api_base)
# Identical to TableauServerRest, but there if someone used a previous version of library where it was versioned
class TableauServerRest32(TableauRestApiBase):
def __init__(self, server: str, username: str, password: str,
site_content_url: Optional[str] = "", api_version: str = "3.2"):
TableauRestApiBase.__init__(self, server, username, password, site_content_url,
api_version=api_version)
self.rest_api_base = self
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods = ExtractMethods(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.groups: GroupMethods = GroupMethods(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods = SubscriptionMethods(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.workbooks: WorkbookMethods = WorkbookMethods(self.rest_api_base)
class TableauServerRest33(TableauRestApiBase):
def __init__(self, server: str, username: str, password: str,
site_content_url: Optional[str] = "", api_version: str = "3.3"):
TableauRestApiBase33.__init__(self, server, username, password, site_content_url,
api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods = ExtractMethods(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods = GroupMethods(self.rest_api_base)
self.projects: ProjectMethods33 = ProjectMethods33(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods = SubscriptionMethods(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.workbooks: WorkbookMethods = WorkbookMethods(self.rest_api_base)
class TableauServerRest34(TableauRestApiBase34):
def __init__(self, server: str, username: str, password: str,
site_content_url: Optional[str] = "", api_version: str = "3.4"):
TableauRestApiBase34.__init__(self, server, username, password, site_content_url,
api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods = ExtractMethods(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods = GroupMethods(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods = SubscriptionMethods(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.workbooks: WorkbookMethods34 = WorkbookMethods34(self.rest_api_base)
class TableauServerRest35(TableauRestApiBase35):
def __init__(self, server: str, username: str, password: str,
site_content_url: Optional[str] = "", api_version: str = "3.5"):
TableauRestApiBase35.__init__(self, server, username, password, site_content_url,
api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods35 = ExtractMethods35(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods = GroupMethods(self.rest_api_base)
self.metadata: MetadataMethods35 = MetadataMethods35(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods35 = SubscriptionMethods35(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.workbooks: WorkbookMethods34 = WorkbookMethods34(self.rest_api_base)
class TableauServerRest36(TableauRestApiBase36):
def __init__(self, server: str, username: Optional[str] = None, password: Optional[str] = None,
site_content_url: Optional[str] = "", pat_name: Optional[str] = None,
pat_secret: Optional[str] = None, api_version: str = "3.6"):
TableauRestApiBase36.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url, pat_name=pat_name,
pat_secret=pat_secret, api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods35 = ExtractMethods35(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods = GroupMethods(self.rest_api_base)
self.metadata: MetadataMethods35 = MetadataMethods35(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods35 = SubscriptionMethods35(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.webhooks: WebhooksMethods36 = WebhooksMethods36(self.rest_api_base)
self.workbooks: WorkbookMethods34 = WorkbookMethods34(self.rest_api_base)
class TableauServerRest37(TableauRestApiBase37):
def __init__(self, server: str, username: Optional[str] = None, password: Optional[str] = None,
site_content_url: Optional[str] = "", pat_name: Optional[str] = None,
pat_secret: Optional[str] = None, api_version: str = "3.7"):
TableauRestApiBase36.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url, pat_name=pat_name,
pat_secret=pat_secret, api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods35 = ExtractMethods35(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods37 = GroupMethods37(self.rest_api_base)
self.metadata: MetadataMethods35 = MetadataMethods35(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods35 = SubscriptionMethods35(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.webhooks: WebhooksMethods36 = WebhooksMethods36(self.rest_api_base)
self.workbooks: WorkbookMethods37 = WorkbookMethods37(self.rest_api_base)
class TableauServerRest38(TableauRestApiBase38):
def __init__(self, server: str, username: Optional[str] = None, password: Optional[str] = None,
site_content_url: Optional[str] = "", pat_name: Optional[str] = None,
pat_secret: Optional[str] = None, api_version: str = "3.8"):
TableauRestApiBase36.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url, pat_name=pat_name,
pat_secret=pat_secret, api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods35 = ExtractMethods35(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods37 = GroupMethods37(self.rest_api_base)
self.metadata: MetadataMethods35 = MetadataMethods35(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods35 = SubscriptionMethods35(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.webhooks: WebhooksMethods36 = WebhooksMethods36(self.rest_api_base)
self.workbooks: WorkbookMethods38 = WorkbookMethods38(self.rest_api_base)
class TableauServerRest39(TableauRestApiBase39):
def __init__(self, server: str, username: Optional[str] = None, password: Optional[str] = None,
site_content_url: Optional[str] = "", pat_name: Optional[str] = None,
pat_secret: Optional[str] = None, api_version: str = "3.9"):
TableauRestApiBase36.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url, pat_name=pat_name,
pat_secret=pat_secret, api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods35 = ExtractMethods35(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods37 = GroupMethods37(self.rest_api_base)
self.metadata: MetadataMethods35 = MetadataMethods35(self.rest_api_base)
self.metrics: MetricsMethods39 = MetricsMethods39(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods35 = SubscriptionMethods35(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.webhooks: WebhooksMethods36 = WebhooksMethods36(self.rest_api_base)
self.workbooks: WorkbookMethods38 = WorkbookMethods38(self.rest_api_base)
class TableauServerRest310(TableauRestApiBase310):
def __init__(self, server: str, username: Optional[str] = None, password: Optional[str] = None,
site_content_url: Optional[str] = "", pat_name: Optional[str] = None,
pat_secret: Optional[str] = None, api_version: str = "3.10"):
TableauRestApiBase36.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url, pat_name=pat_name,
pat_secret=pat_secret, api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods35 = ExtractMethods35(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods37 = GroupMethods37(self.rest_api_base)
self.metadata: MetadataMethods35 = MetadataMethods35(self.rest_api_base)
self.metrics: MetricsMethods39 = MetricsMethods39(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods35 = SubscriptionMethods35(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.webhooks: WebhooksMethods36 = WebhooksMethods36(self.rest_api_base)
self.workbooks: WorkbookMethods38 = WorkbookMethods38(self.rest_api_base)
class TableauServerRest311(TableauRestApiBase311):
def __init__(self, server: str, username: Optional[str] = None, password: Optional[str] = None,
site_content_url: Optional[str] = "", pat_name: Optional[str] = None,
pat_secret: Optional[str] = None, api_version: str = "3.11"):
TableauRestApiBase36.__init__(self, server=server, username=username, password=password,
site_content_url=site_content_url, pat_name=pat_name,
pat_secret=pat_secret, api_version=api_version)
self.rest_api_base = self
self.alerts: AlertMethods = AlertMethods(self.rest_api_base)
self.datasources: DatasourceMethods = DatasourceMethods(self.rest_api_base)
self.extracts: ExtractMethods35 = ExtractMethods35(self.rest_api_base)
self.favorites: FavoritesMethods = FavoritesMethods(self.rest_api_base)
self.flows: FlowMethods33 = FlowMethods33(self.rest_api_base)
self.groups: GroupMethods37 = GroupMethods37(self.rest_api_base)
self.metadata: MetadataMethods35 = MetadataMethods35(self.rest_api_base)
self.metrics: MetricsMethods39 = MetricsMethods39(self.rest_api_base)
self.projects: ProjectMethods = ProjectMethods(self.rest_api_base)
self.revisions: RevisionMethods = RevisionMethods(self.rest_api_base)
self.schedules: ScheduleMethods = ScheduleMethods(self.rest_api_base)
self.sites: SiteMethods = SiteMethods(self.rest_api_base)
self.subscriptions: SubscriptionMethods35 = SubscriptionMethods35(self.rest_api_base)
self.users: UserMethods = UserMethods(self.rest_api_base)
self.webhooks: WebhooksMethods36 = WebhooksMethods36(self.rest_api_base)
self.workbooks: WorkbookMethods38 = WorkbookMethods38(self.rest_api_base)