diff --git a/docs/dev-guide.md b/docs/dev-guide.md index bd3266f06..0a16b112d 100644 --- a/docs/dev-guide.md +++ b/docs/dev-guide.md @@ -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). diff --git a/docs/samples.md b/docs/samples.md index ed6533e18..7e2020798 100644 --- a/docs/samples.md +++ b/docs/samples.md @@ -10,14 +10,19 @@ 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: @@ -25,8 +30,7 @@ For example, if you run the following command: 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