Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit d5f707d

Browse files
committed
cleanup of usage, added more flag descriptions
1 parent d23ed90 commit d5f707d

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ import CloudFlare
463463

464464
### Exception examples
465465

466-
Here's examples using the CLI command cli4 of the responses passed back in exceptions.
466+
Here's examples using the CLI command `cli4` of the responses passed back in exceptions.
467467

468468
First a simple get with a clean (non-error) response.
469469

@@ -604,12 +604,23 @@ if __name__ == '__main__':
604604

605605
## CLI
606606

607-
All API calls can be called from the command line.
608-
The command will convert domain names prefixed with a colon (`:`) into zone_identifiers: e.g. to view `example.com` you must use `cli4 /zones/:example.com` (the zone ID cannot be used).
607+
All API calls can be called from the command line via the `cli4` command.
608+
Additionally, the `cli4` command will convert domain name or account name prefixed with a colon (`:`) into the correct identifier.
609+
e.g. to view `example.com` you can use `cli4 /zones/:example.com`.
610+
You can pass the zone identifier (or account identifier or any identifier) with a colon followed by the identifier as a hex number 32 characters long.
609611

610612
```bash
611-
$ cli4 [-V|--version] [-h|--help] [-v|--verbose] [-q|--quiet] [-j|--json] [-y|--yaml] [-n|ndjson] [-r|--raw] [-d|--dump] [-A|--openapi url] [-b|--binary] [-p|--profile profile-name] [--get|--patch|--post|--put|--delete] [item=value|item=@filename|@filename ...] /command ...
612-
613+
$ cli4 [-V|--version] [-h|--help] [-v|--verbose] \
614+
[-e|--examples] \
615+
[-q|--quiet] \
616+
[-j|--json] [-y|--yaml] [-n|--ndjson] [-i|--image] \
617+
[-r|--raw] \
618+
[-d|--dump] \
619+
[-A|--openapi url] \
620+
[-b|--binary] \
621+
[-p|--profile profile-name] \
622+
[--get|--patch|--post|--put|--delete] \
623+
[item=value|item=@filename|@filename ...] /command ...
613624
```
614625

615626
### CLI parameters for POST/PUT/PATCH
@@ -645,7 +656,13 @@ Data can also be uploaded from file contents. Using the ```item=@filename``` for
645656

646657
### CLI output
647658

648-
The output from the CLI command is in JSON or YAML format (and human readable). This is controled by the **--yaml** or **--json** flags (JSON is the default).
659+
The default output from the CLI command is in JSON.
660+
It can also output YAML format (i.e. human readable).
661+
This is controled by the `--yaml` or `--json` flags (JSON is the default).
662+
There is also a `--ndjson` flag for use with line based JSON data - this is mainly used for log data.
663+
664+
Additonally the output can be plain text or binary image format depending on the results from the API call (some calls results in non JSON results).
665+
The `--image` flag will return the data in the same format as the API's results.
649666

650667
### Simple CLI examples
651668

0 commit comments

Comments
 (0)