| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | | |
Source code is documented to the best of my knowledge and understanding.
|
| | |
| | |
| | |
| | | |
Pushing this change to continue work elsewhere.
|
| | |
| | |
| | |
| | |
| | | |
sx-request-make returns a nested list (or vector of lists). Return
`'(())` to ensure it is an acceptable response.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`.
|
| |
| |
| |
| |
| |
| | |
alist)` error.
Moved `api-key` to let binding rather than directly in if statement.
|
| |
| |
| |
| |
| | |
If `need-auth` is `'warn`, break with `user-error` to advise the user
to authenticate. Otherwise the query will result in an `Error 401`.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`GET` methods.
(sx-request-make): Added optional arguments for using "POST" and AUTH
when performing requests
(sx-request--build-keyword-arguments): Add option of using AUTH and
including in query when required.
(sx-request-build): Removed
(sx-request--request): New function to perform query with all
variables let bound.
sx-auth.el: Updated `sx-auth-root` to be full auth URL rather than
lack method.
(sx-auth-authenticate): Remove dependency on `sx-request-build` and
perform construction inline.
|
|
|
|
| |
This will prevent loss of authentication token when using authentication.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Test for a GZIP'd using magic bytes. See the appropriate answer on
Emacs.SE (1) for details.
(1): http://emacs.stackexchange.com/a/2978
|
|\
| |
| |
| |
| | |
Conflicts:
sx-request.el
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Keeping method calls within `sx-request.el' was causing circular
requirements.
This commit sorts through all of the requirements for each of the files
and ensures that this does not happen. Much of the content removed was
for `sx-request-default-keyword-arguments-alist' and related items. It
was unused, so it was pruned. If it is deemed necessary in the future,
it should be included in `sx-method.el'.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* sx-auth.el
- Use new symbolic cache access
* sx-cache.el
- Implement symbolic cache access
* sx-filter.el
- Use symbolic cache access
- Compile and save filters on-demand
(more work to be done to this end)
* sx-question.el
- Symbolic filters
* sx-request.el
- Protection against infinitely recursing when compiling a filter
This will be re-worked into requests (a front-end function) and
'raw' requests (a back-end function). The front-end will add
convenience to the back-end.
* test/tests.el
Remove outdated tests
|
|
A file stackexchange.el should be added for user-facing functions.
|