Skip to content

Commit c56d6d6

Browse files
committed
Docs tweaks
1 parent 7c171df commit c56d6d6

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

docs/topics/api-clients.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ exposes a supported schema format.
5858

5959
To install the Core API command line client, use `pip`.
6060

61-
$ pip install coreapi
61+
Note that the command-line client is a separate package to the
62+
python client library `coreapi`. Make sure to install `coreapi-cli`.
63+
64+
$ pip install coreapi-cli
6265

6366
To start inspecting and interacting with an API the schema must first be loaded
6467
from the network.
6568

66-
6769
$ coreapi get http://api.example.org/
6870
<Pastebin API "http://127.0.0.1:8000/">
6971
snippets: {
@@ -120,7 +122,14 @@ To inspect the underlying HTTP request and response, use the `--debug` flag.
120122

121123
Some actions may include optional or required parameters.
122124

123-
$ coreapi action users create --params username example
125+
$ coreapi action users create --param username=example
126+
127+
When using `--param`, the type of the input will be determined automatically.
128+
129+
If you want to be more explicit about the parameter type then use `--data` for
130+
any null, numeric, boolean, list, or object inputs, and use `--string` for string inputs.
131+
132+
$ coreapi action users edit --string username=tomchristie --data is_admin=true
124133

125134
## Authentication & headers
126135

@@ -195,7 +204,9 @@ API that exposes a supported schema format.
195204
## Getting started
196205

197206
You'll need to install the `coreapi` package using `pip` before you can get
198-
started. Once you've done so, open up a python terminal.
207+
started.
208+
209+
pip install coreapi
199210

200211
In order to start working with an API, we first need a `Client` instance. The
201212
client holds any configuration around which codecs and transports are supported

0 commit comments

Comments
 (0)