diff --git a/tableauserverclient/server/pager.py b/tableauserverclient/server/pager.py index 2c05394e..3c7e60f7 100644 --- a/tableauserverclient/server/pager.py +++ b/tableauserverclient/server/pager.py @@ -51,24 +51,6 @@ class Pager(Iterable[T]): ------ ValueError If the endpoint is not a callable or an Endpoint object. - - Examples - -------- - >>> # Loop over all workbooks on the site - >>> for workbook in TSC.Pager(server.workbooks): - >>> print(workbook.name) - - >>> # Setting page size - >>> request_options = TSC.RequestOptions(pagesize=1000) - >>> all_workbooks = list(TSC.Pager(server.workbooks, request_options)) - - >>> # Starting on page 2 - >>> request_options = TSC.RequestOptions(pagenumber=2) - >>> for workbook in TSC.Pager(server.workbooks, request_options): - >>> print(workbook.name) - - >>> # Using in a list comprehension - >>> views = [view for view in TSC.Pager(workbook.views) if "sales" in view.name.lower()] """ def __init__( diff --git a/tableauserverclient/server/request_options.py b/tableauserverclient/server/request_options.py index 29b06d01..fca9a3a3 100644 --- a/tableauserverclient/server/request_options.py +++ b/tableauserverclient/server/request_options.py @@ -55,23 +55,6 @@ class contained within this class. pagesize: int, optional The number of items to return per page. Default is 100. Can also read from the environment variable `TSC_PAGE_SIZE` - - Examples - -------- - >>> # Get the first 50 workbooks on the site - >>> request_options = TSC.RequestOptions(pagesize=50) - - >>> # Get the next 50 workbooks on the site - >>> request_options.page_number(2) - - >>> # Get the first 50 workbooks on the site, sorted by name - >>> request_options = TSC.RequestOptions(pagesize=50) - >>> request_options.sort.add(TSC.Sort(TSC.RequestOptions.Field.Name, TSC.Sort.Direction.Asc)) - - >>> # Get the first 50 workbooks on the site, filtered by a tag - >>> request_options = TSC.RequestOptions(pagesize=50) - >>> request_options.filter.add(TSC.Filter(TSC.RequestOptions.Field.Tags, TSC.Filter.Operator.Equals, "important")) - """ def __init__(self, pagenumber=1, pagesize=None): diff --git a/tableauserverclient/server/sort.py b/tableauserverclient/server/sort.py index 014ed81f..b7864592 100644 --- a/tableauserverclient/server/sort.py +++ b/tableauserverclient/server/sort.py @@ -11,20 +11,6 @@ class Sort: direction : str The direction to sort, either ascending (Asc) or descending (Desc). The options are defined in the RequestOptions.Direction class. - - Examples - -------- - - >>> # create a new instance of a request option object - >>> req_option = TSC.RequestOptions() - - >>> # add the sort expression, sorting by name and direction - >>> req_option.sort.add(TSC.Sort(TSC.RequestOptions.Field.Name, - TSC.RequestOptions.Direction.Asc)) - >>> matching_workbooks, pagination_item = server.workbooks.get(req_option) - - >>> for wb in matching_workbooks: - >>> print(wb.name) """ def __init__(self, field, direction):