|
21 | 21 |
|
22 | 22 |
|
23 | 23 | class WorkbookItem:
|
| 24 | + """ |
| 25 | + The workbook resources for Tableau are defined in the WorkbookItem class. |
| 26 | + The class corresponds to the workbook resources you can access using the |
| 27 | + Tableau REST API. Some workbook methods take an instance of the WorkbookItem |
| 28 | + class as arguments. The workbook item specifies the project. |
| 29 | +
|
| 30 | + Parameters |
| 31 | + ---------- |
| 32 | + project_id : Optional[str], optional |
| 33 | + The project ID for the workbook, by default None. |
| 34 | +
|
| 35 | + name : Optional[str], optional |
| 36 | + The name of the workbook, by default None. |
| 37 | +
|
| 38 | + show_tabs : bool, optional |
| 39 | + Determines whether the workbook shows tabs for the view. |
| 40 | +
|
| 41 | + Attributes |
| 42 | + ---------- |
| 43 | + connections : list[ConnectionItem] |
| 44 | + The list of data connections (ConnectionItem) for the data sources used |
| 45 | + by the workbook. You must first call the workbooks.populate_connections |
| 46 | + method to access this data. See the ConnectionItem class. |
| 47 | +
|
| 48 | + content_url : Optional[str] |
| 49 | + The name of the workbook as it appears in the URL. |
| 50 | +
|
| 51 | + created_at : Optional[datetime.datetime] |
| 52 | + The date and time the workbook was created. |
| 53 | +
|
| 54 | + description : Optional[str] |
| 55 | + User-defined description of the workbook. |
| 56 | +
|
| 57 | + id : Optional[str] |
| 58 | + The identifier for the workbook. You need this value to query a specific |
| 59 | + workbook or to delete a workbook with the get_by_id and delete methods. |
| 60 | +
|
| 61 | + owner_id : Optional[str] |
| 62 | + The identifier for the owner (UserItem) of the workbook. |
| 63 | +
|
| 64 | + preview_image : bytes |
| 65 | + The thumbnail image for the view. You must first call the |
| 66 | + workbooks.populate_preview_image method to access this data. |
| 67 | +
|
| 68 | + project_name : Optional[str] |
| 69 | + The name of the project that contains the workbook. |
| 70 | +
|
| 71 | + size: int |
| 72 | + The size of the workbook in megabytes. |
| 73 | +
|
| 74 | + hidden_views: Optional[list[str]] |
| 75 | + List of string names of views that need to be hidden when the workbook |
| 76 | + is published. |
| 77 | +
|
| 78 | + tags: set[str] |
| 79 | + The set of tags associated with the workbook. |
| 80 | +
|
| 81 | + updated_at : Optional[datetime.datetime] |
| 82 | + The date and time the workbook was last updated. |
| 83 | +
|
| 84 | + views : list[ViewItem] |
| 85 | + The list of views (ViewItem) for the workbook. You must first call the |
| 86 | + workbooks.populate_views method to access this data. See the ViewItem |
| 87 | + class. |
| 88 | +
|
| 89 | + web_page_url : Optional[str] |
| 90 | + The full URL for the workbook. |
| 91 | +
|
| 92 | + Examples |
| 93 | + -------- |
| 94 | + # creating a new instance of a WorkbookItem |
| 95 | + >>> import tableauserverclient as TSC |
| 96 | +
|
| 97 | + >>> # Create new workbook_item with project id '3a8b6148-493c-11e6-a621-6f3499394a39' |
| 98 | +
|
| 99 | + >>> new_workbook = TSC.WorkbookItem('3a8b6148-493c-11e6-a621-6f3499394a39') |
| 100 | + """ |
| 101 | + |
24 | 102 | def __init__(self, project_id: Optional[str] = None, name: Optional[str] = None, show_tabs: bool = False) -> None:
|
25 | 103 | self._connections = None
|
26 | 104 | self._content_url = None
|
|
0 commit comments