@@ -58,12 +58,14 @@ exposes a supported schema format.
58
58
59
59
To install the Core API command line client, use ` pip ` .
60
60
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
62
65
63
66
To start inspecting and interacting with an API the schema must first be loaded
64
67
from the network.
65
68
66
-
67
69
$ coreapi get http://api.example.org/
68
70
<Pastebin API "http://127.0.0.1:8000/">
69
71
snippets: {
@@ -120,7 +122,14 @@ To inspect the underlying HTTP request and response, use the `--debug` flag.
120
122
121
123
Some actions may include optional or required parameters.
122
124
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
124
133
125
134
## Authentication & headers
126
135
@@ -195,7 +204,9 @@ API that exposes a supported schema format.
195
204
## Getting started
196
205
197
206
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
199
210
200
211
In order to start working with an API, we first need a ` Client ` instance. The
201
212
client holds any configuration around which codecs and transports are supported
0 commit comments