Skip to content

Commit

Permalink
chore: remove examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jorwoods committed Nov 6, 2024
1 parent aed0fa9 commit 8983e1a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 49 deletions.
18 changes: 0 additions & 18 deletions tableauserverclient/server/pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down
17 changes: 0 additions & 17 deletions tableauserverclient/server/request_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
14 changes: 0 additions & 14 deletions tableauserverclient/server/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 8983e1a

Please sign in to comment.