File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
tableauserverclient/server Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ from functools import partial
2
+
1
3
from . import RequestOptions
2
4
from . import Sort
3
5
@@ -11,13 +13,15 @@ class Pager(object):
11
13
Will loop over anything that returns (List[ModelItem], PaginationItem).
12
14
"""
13
15
14
- def __init__ (self , endpoint , request_opts = None ):
16
+ def __init__ (self , endpoint , request_opts = None , ** kwargs ):
15
17
16
18
if hasattr (endpoint , 'get' ):
17
19
# The simpliest case is to take an Endpoint and call its get
18
- self ._endpoint = endpoint .get
20
+ endpoint = partial (endpoint .get , ** kwargs )
21
+ self ._endpoint = endpoint
19
22
elif callable (endpoint ):
20
23
# but if they pass a callable then use that instead (used internally)
24
+ endpoint = partial (endpoint , ** kwargs )
21
25
self ._endpoint = endpoint
22
26
else :
23
27
# Didn't get something we can page over
You can’t perform that action at this time.
0 commit comments