Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/dev-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ depending on how and where git is installed on your system, for example:
1. Add testing by getting real xml responses from the server, and asserting that
all properties are parsed and set correctly.

1. Add a sample to show users how to use the new feature.
1. Add a sample to show users how to use the new feature. Try to keep the command
line arguments of your sample consistent with the [Samples documentation page](samples)
and with other samples.

1. Add documentation (most likely in api-ref.md) in a separate pull request
(see more below).
Expand Down
20 changes: 12 additions & 8 deletions docs/samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ The TSC samples are included in the `samples` directory of the TSC repository [o

## Run the samples

Each of the samples requires the following arguments:
Each of the samples accepts the following arguments:

* `--server`. The URL for the Tableau Server that you want to connect to.
* `--username`. The user name of the Tableau Server account that you want to use. When you run the samples, you are
prompted for a password for the user account that you enter.
* `--server` (required): The URL for the Tableau Server that you want to connect to.
* `--site` (optional): The site on the Server that you want to connect to.
* `--token-name` (required): The name of the personal access token used to sign into the server.
* `--token-value` (required): The value of the personal access token used to sign into the server.
* `--logging-level` (optional; `debug`, `info` or `error`): The desired log level.

Additionally, some of the samples require that you enter other arguments when you run them. For more information about
the arguments required by a particular sample, run the sample with the `-h` flag to see the help output.
To get a `token-name` and `token-value`, you will have to create personal access token first.
You can follow [Tableau's documentation](https://help.tableau.com/current/server/en-us/security_personal_access_tokens.htm#create-tokens) to do so.

Some of the samples also require additional arguments. For more information about the arguments
required by a particular sample, run the sample with the `-h` flag.

For example, if you run the following command:

```shell
python samples/publish_workbook.py -h
```

You might see that you need to enter a server address, a user name, and a file path for the workbook that you want to
publish.
You will see that you need to enter a file path for the workbook that you want to publish.

## Samples list

Expand Down