diff options
author | Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com> | 2014-11-20 13:06:01 -0500 |
---|---|---|
committer | Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com> | 2014-11-20 13:06:01 -0500 |
commit | 534b1ab1f70dbc9029cd76d4ac627c1792e69ed9 (patch) | |
tree | 2b3fa09ff1057282dbb1efae6bbd7286a89c96df /test | |
parent | 2e2619d7b1ec9a5d7338c5ec224ac0ba920e017c (diff) |
sx-method-call rewritten and associated improvements in sx-request.
Now requires `'sx-auth` to account for authentication.
(sx-method-call) is now defined using `cl-defun` and uses keys rather
than positional arguments.
Authentication logic is performed in `sx-method-call` to ensure commands
are only passed on once they are needed.
When access token is available:
- Filters will be used as provided
- Methods will be called
When access token is unavailable:
- Filters will downgrade to only request object that do not require
auth.
- Methods will instead use `sx-request-fallback` and return nil.
If auth is not specified but is required, `sx-method-call` will throw an
error. If auth is specified as `'warn`, `user-error` will be called.
(sx-request--build-keyword-arguments) has been simplified. It will
always pass an available access_token (api indicates doing so will use a
user/key quota rather than simply key quota).
(sx-request-make) now performs url retrieval directly. Query
construction is all performed by `sx-method-call`.
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions