Commit Graph

14 Commits

Author SHA1 Message Date
Sebastian Thiel
e34e24e049 feat(CLI):required arg parsing + first doit() call
We are parsing required scalar values and handle parse-errors correctly,
to the point were we make a simple, non-upload doit() call.

It shows that we seem to build invalid calls, for now,but that's nothing
we can't fix once the time is ripe.

Next goals will be related to finalizing the argument parsing code.

Fixes #60
2015-04-14 17:17:21 +02:00
Sebastian Thiel
d6919f1eb6 feat(CLI): infrastructure for call and dry-run
Now we are able to cleanly handle our arguments on a per-method basis.
The generated code won't clutter our design as we put the details into
their own methods.

Fixes #59
2015-04-14 15:42:12 +02:00
Sebastian Thiel
be228f1994 feat(CLI): engine checks resource and method args
We are now at a spot where we can actually start parsing arguments.

* ArgumentError -> ClIError - seems more fitting

Fixes #55
2015-04-14 09:41:55 +02:00
Sebastian Thiel
e45eb053d5 fix(CLI): Display for Errors + refactor
* refactored errors into a hierarchy
* implemented `Display` trait for all error types, including some
  'hierarchy-aware' printing.

Fixes #54
2015-04-14 08:34:53 +02:00
Sebastian Thiel
b64722cca8 docs(CLI): random values + cursor information
* Instead of writing pod-types, we generate a random value of the
  required type.
* Fully document how cursors can be set, which is all that's usually
  demonstrated in more complex dynamic structure documentation

Fixes #49
2015-04-13 14:18:32 +02:00
Sebastian Thiel
47f9ca8b20 docs(CLI): absolute top-level cursor + details
* just for show, use absolute cursors in the top-level structure
* indicate you are setting an array or hashmap in the details
2015-04-13 13:50:58 +02:00
Sebastian Thiel
92b1ef7476 docs(CLI):dynamic absolute cursor position example
We build all required -r flags using absolute cursor positions only.
The next step should be to use relative ones, and of course be more
verbose about how this should be interpreted (sequential).
2015-04-13 12:06:52 +02:00
Sebastian Thiel
5b4f18d341 fix(api+cli): improved scope handling; fix CLI
* in APIs, scopes will now be per-method, and if no scope is given,
  we will assume only the API key has to be set. Previously there was
  a wild mix between globally mentioned scopes and method scopes.
* assure CLI generation works so far, for all avaialable APIs

Related to #48
2015-04-13 10:50:19 +02:00
Sebastian Thiel
6d3bbcea57 docs(CLI): upload and output flag
We are already there, except for documenting the request value type,
which definitely deserves a separate issue.

Fixes #45
2015-04-12 20:24:12 +02:00
Sebastian Thiel
c004840d5b docs(CLI): inforamtion about setting structs
For now we just have a 'dum' example, but once we are there, we shall
make the example and documentation based on the actual request value.

This requires some additional work, which fortunately has to be done
in python only.
2015-04-12 18:46:04 +02:00
Sebastian Thiel
c65a8a6bdf docs(CLI): add required scalar arguments 2015-04-12 18:16:53 +02:00
Sebastian Thiel
49c4a4101e docs(scopes): added CLI scope documentation
In addition to that, they can now be set as well.
Unified generation of the 'default' scope.
2015-04-12 17:15:55 +02:00
Sebastian Thiel
310c81f19c feat(cli): generate complete docopts grammar
Grammar is laid out per method, providing general purpose arguments
only as needed/supported.

All details will be contained in the markdown documentation.

Related to #45
2015-04-12 12:23:00 +02:00
Sebastian Thiel
acd42dfccc fix(make): dependencies are now per-program-type
Previously we put cli.py into the common lib folder, which caused the
API to be regenerated and rebuilt whenever we changed code that will
only affect the CLI, causing terrible turnaround times.

Now the dependency is fixed.
2015-04-12 09:55:17 +02:00