<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 15 Aug 2016, at 8:35, Thomas Mäder wrote:</p>
<p dir="auto"></p></div>
<div style="white-space:pre-wrap"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div dir="auto">Hi folks,
</div><div dir="auto">
</div><div dir="auto">It has been requested that we document our command line interface. To me, however it's not quite clear in what form we should do that: technically, the cli is self-documenting. If you do "alm-cli --help", it will give you a list of possible commands and options. The alm-cli command is mentioned in the developer set up section on github. Do we believe this is sufficient? What else is necessary?
</div></blockquote></div>
<div style="white-space:normal">
<p dir="auto">The issue we got open is that the docs don't actually explain to you <em>how</em> to use it.</p>
<p dir="auto">What I current see when running <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">alm-cli create --help</code> that does not actually tell me how to run this unless we expect users to know the json format.</p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">./bin/alm-cli create workitem --help ◼
Payload example:
{
"fields": {
"Maiores similique facere ipsa.": 0.7636827460427832
},
"name": "Dicta numquam aut.",
"type": "Expedita minima."
}
Usage:
alm-cli create workitem ["/api/workitem"] [flags]
Flags:
--content string Request content type override, e.g. 'application/x-www-form-urlencoded'
--payload string Request body encoded in JSON
--pp Pretty print response body
Global Flags:
--dump Dump HTTP request and response.
--format string Format used to create auth header or query from key (default "Bearer %s")
-H, --host string API hostname (default "almighty.io")
--key string API key used for authentication
-s, --scheme string Set the requests scheme
-t, --timeout duration Set the request timeout (default 20s)
</code></pre>
<p dir="auto">So if I follow this I run:</p>
<p dir="auto"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">./bin/alm-cli create workitem --payload "{ "fields": { "Maiores similique facere ipsa.": 0.7636827460427832 }, "name": "Dicta numquam aut.", "type": "Expedita minima." }"<br>
</code></p>
<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">Error: failed to deserialize payload: invalid character 'f' looking for beginning of object key string
Usage:
alm-cli create workitem ["/api/workitem"] [flags]
Flags:
--content string Request content type override, e.g. 'application/x-www-form-urlencoded'
--payload string Request body encoded in JSON
--pp Pretty print response body
Global Flags:
--dump Dump HTTP request and response.
--format string Format used to create auth header or query from key (default "Bearer %s")
-H, --host string API hostname (default "almighty.io")
--key string API key used for authentication
-s, --scheme string Set the requests scheme
-t, --timeout duration Set the request timeout (default 20s)
failed to deserialize payload: invalid character 'f' looking for beginning of object key string%```
And thus I'm still not closer being able to run the cli as a new user.
Would be good we actually have a *working* example in the cli help output, or as minimum when we actually close of an issue for cli adds an example that can be run and then used for testing/verifying/playing with the cli.
/max
http://about.me/maxandersen
</code></pre>
</div>
</div>
</body>
</html>