File tree Expand file tree Collapse file tree 3 files changed +0
-49
lines changed
tableauserverclient/server Expand file tree Collapse file tree 3 files changed +0
-49
lines changed Original file line number Diff line number Diff line change @@ -51,24 +51,6 @@ class Pager(Iterable[T]):
51
51
------
52
52
ValueError
53
53
If the endpoint is not a callable or an Endpoint object.
54
-
55
- Examples
56
- --------
57
- >>> # Loop over all workbooks on the site
58
- >>> for workbook in TSC.Pager(server.workbooks):
59
- >>> print(workbook.name)
60
-
61
- >>> # Setting page size
62
- >>> request_options = TSC.RequestOptions(pagesize=1000)
63
- >>> all_workbooks = list(TSC.Pager(server.workbooks, request_options))
64
-
65
- >>> # Starting on page 2
66
- >>> request_options = TSC.RequestOptions(pagenumber=2)
67
- >>> for workbook in TSC.Pager(server.workbooks, request_options):
68
- >>> print(workbook.name)
69
-
70
- >>> # Using in a list comprehension
71
- >>> views = [view for view in TSC.Pager(workbook.views) if "sales" in view.name.lower()]
72
54
"""
73
55
74
56
def __init__ (
Original file line number Diff line number Diff line change @@ -55,23 +55,6 @@ class contained within this class.
55
55
pagesize: int, optional
56
56
The number of items to return per page. Default is 100. Can also read
57
57
from the environment variable `TSC_PAGE_SIZE`
58
-
59
- Examples
60
- --------
61
- >>> # Get the first 50 workbooks on the site
62
- >>> request_options = TSC.RequestOptions(pagesize=50)
63
-
64
- >>> # Get the next 50 workbooks on the site
65
- >>> request_options.page_number(2)
66
-
67
- >>> # Get the first 50 workbooks on the site, sorted by name
68
- >>> request_options = TSC.RequestOptions(pagesize=50)
69
- >>> request_options.sort.add(TSC.Sort(TSC.RequestOptions.Field.Name, TSC.Sort.Direction.Asc))
70
-
71
- >>> # Get the first 50 workbooks on the site, filtered by a tag
72
- >>> request_options = TSC.RequestOptions(pagesize=50)
73
- >>> request_options.filter.add(TSC.Filter(TSC.RequestOptions.Field.Tags, TSC.Filter.Operator.Equals, "important"))
74
-
75
58
"""
76
59
77
60
def __init__ (self , pagenumber = 1 , pagesize = None ):
Original file line number Diff line number Diff line change @@ -11,20 +11,6 @@ class Sort:
11
11
direction : str
12
12
The direction to sort, either ascending (Asc) or descending (Desc). The
13
13
options are defined in the RequestOptions.Direction class.
14
-
15
- Examples
16
- --------
17
-
18
- >>> # create a new instance of a request option object
19
- >>> req_option = TSC.RequestOptions()
20
-
21
- >>> # add the sort expression, sorting by name and direction
22
- >>> req_option.sort.add(TSC.Sort(TSC.RequestOptions.Field.Name,
23
- TSC.RequestOptions.Direction.Asc))
24
- >>> matching_workbooks, pagination_item = server.workbooks.get(req_option)
25
-
26
- >>> for wb in matching_workbooks:
27
- >>> print(wb.name)
28
14
"""
29
15
30
16
def __init__ (self , field , direction ):
You can’t perform that action at this time.
0 commit comments