mirror of
https://github.com/simonw/dclient.git
synced 2026-09-10 10:34:10 +02:00
dclient actor command, closes #26
This commit is contained in:
parent
20851f6ed6
commit
ea3dc64fb9
2 changed files with 81 additions and 1 deletions
|
|
@ -28,7 +28,21 @@ To delete the token for a specific URL, run `auth remove`:
|
|||
```bash
|
||||
dclient auth remove https://latest.datasette.io/
|
||||
```
|
||||
## Testing a token
|
||||
|
||||
The `dclient actor` command can be used to test a token, retrieving the actor that the token represents.
|
||||
```bash
|
||||
dclient actor https://latest.datasette.io/content
|
||||
```
|
||||
The output looks like this:
|
||||
```json
|
||||
{
|
||||
"actor": {
|
||||
"id": "root",
|
||||
"token": "dstok"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## dclient auth --help
|
||||
<!-- [[[cog
|
||||
|
|
@ -135,3 +149,29 @@ Options:
|
|||
|
||||
```
|
||||
<!-- [[[end]]] -->
|
||||
|
||||
## dclient actor --help
|
||||
|
||||
<!-- [[[cog
|
||||
import cog
|
||||
result = runner.invoke(cli.cli, ["actor", "--help"])
|
||||
help = result.output.replace("Usage: cli", "Usage: dclient")
|
||||
cog.out(
|
||||
"```\n{}\n```".format(help)
|
||||
)
|
||||
]]] -->
|
||||
```
|
||||
Usage: dclient actor [OPTIONS] URL_OR_ALIAS
|
||||
|
||||
Show the actor represented by an API token
|
||||
|
||||
Example usage:
|
||||
|
||||
dclient actor https://latest.datasette.io/fixtures
|
||||
|
||||
Options:
|
||||
--token TEXT API token
|
||||
--help Show this message and exit.
|
||||
|
||||
```
|
||||
<!-- [[[end]]] -->
|
||||
Loading…
Add table
Add a link
Reference in a new issue