aboutsummaryrefslogtreecommitdiff
path: root/sx-request.el
Commit message (Collapse)AuthorAgeFilesLines
* Hotfix kill response buffers after requestSean Allred2015-01-061-0/+1
|
* Add process-function arg to request-fallback. Fix #205Artur Malabarba2015-01-051-1/+3
|
* Standardize local variablesSean Allred2015-01-041-1/+5
| | | | | - Move lexical-binding to top of file; fixes #123 - Use indent-tabs-mode: nil for all files
* Use symbols for url-request-methodSean Allred2015-01-041-2/+2
|
* Fix indentationSean Allred2015-01-031-1/+1
|
* Remove process-function from request-all-itemsSean Allred2015-01-021-2/+2
| | | | It doesn't really make sense.
* Use variable instead of default for request-delaySean Allred2015-01-021-5/+8
|
* Declare indentation patterns for request functionsSean Allred2015-01-021-0/+2
|
* Introduce anti-throttling delaySean Allred2015-01-021-2/+5
|
* Consolidate state changesSean Allred2015-01-021-3/+3
|
* Introduce `sx-request-all-items'Sean Allred2015-01-021-0/+32
| | | | | | | This function repeatedly makes API requests until a condition is satisfied (such as 'no more items'). First and foremost, this will allow us to retrieve all tags for a site.
* Add process-function to sx-request-makeSean Allred2015-01-021-4/+12
|
* Fix typoSean Allred2014-12-301-1/+1
|
* Handle utf-8 encoding the right way.Artur Malabarba2014-12-201-7/+12
|
* Prefer zlib-decompress-region when available.Artur Malabarba2014-12-201-5/+10
| | | | Fix #157
* Indentation was off by oneArtur Malabarba2014-12-201-34/+34
|
* _ indicates a variable is ignored.Artur Malabarba2014-12-151-1/+1
|
* Improve some header comments.Artur Malabarba2014-12-061-1/+1
|
* Merge branch 'master' into issue-130Sean Allred2014-12-031-11/+5
|\ | | | | | | | | | | | | Conflicts: sx-request.el Conflict was trivial.
| * Remove need-auth from sx-request--build-keyword-argumentsArtur Malabarba2014-11-291-11/+5
| |
* | Hexify value in key-value pairsSean Allred2014-12-021-1/+1
| | | | | | | | Fixes #130
* | Prune unused parameterSean Allred2014-12-021-1/+1
|/
* Fix #111Sean Allred2014-11-271-2/+2
|
* Fix docstring/argument list ordering (mistake during merge).Jonathan Leech-Pepin2014-11-211-3/+3
| | | | | Fix `url-automatic-caching` to use `t` rather than `sx-request-cache-p` (used in tests only).
* Merge branch 'master' into sx-method-auth. Conflicts have beenJonathan Leech-Pepin2014-11-211-20/+70
|\ | | | | | | | | | | | | | | | | | | | | | | | | resolved. Logic and functions have been kept from the `cl-defun` `sx-method-call` while docstrings have been updated as per #77 when possible. Conflicts: sx-auth.el sx-method.el sx-question.el sx-request.el
| * GitHub comments -- #77Sean Allred2014-11-201-8/+8
| |
| * Use `user-error' when there's no question at pointSean Allred2014-11-191-0/+1
| |
| * Remove -cache-pSean Allred2014-11-191-6/+1
| |
| * Minor typos and incorrect informationSean Allred2014-11-191-2/+2
| |
| * Add `customize' dataSean Allred2014-11-191-2/+6
| |
| * Merge branch 'master' into documentationSean Allred2014-11-191-30/+57
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sx-method.el sx-question-list.el sx-question-mode.el sx-question.el sx-request.el sx.el
| * | Documentation -- part threeSean Allred2014-11-181-1/+3
| | | | | | | | | | | | Source code is documented to the best of my knowledge and understanding.
| * | Documentation -- part oneSean Allred2014-11-171-20/+60
| | | | | | | | | | | | Pushing this change to continue work elsewhere.
* | | Properly return a nil entry when falling backJonathan Leech-Pepin2014-11-201-1/+1
| | | | | | | | | | | | | | | sx-request-make returns a nested list (or vector of lists). Return `'(())` to ensure it is an acceptable response.
* | | sx-method-call rewritten and associated improvements in sx-request.Jonathan Leech-Pepin2014-11-201-41/+24
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | Change from `add-to-list` to `push` to avoid a strange `(void-variableJonathan Leech-Pepin2014-11-171-2/+3
| | | | | | | | | | | | alist)` error. Moved `api-key` to let binding rather than directly in if statement.
* | Adjust request keyword creation to verify if AUTH is needed.Jonathan Leech-Pepin2014-11-171-16/+32
| | | | | | | | | | If `need-auth` is `'warn`, break with `user-error` to advise the user to authenticate. Otherwise the query will result in an `Error 401`.
* | Fix incorrect call to `call` rather than `request-url`Jonathan Leech-Pepin2014-11-171-1/+1
| |
* | Updated `sx-request-make` to use a consistent format for both `POST` and ↵Jonathan Leech-Pepin2014-11-141-20/+24
|/ | | | | | | | | | | | | | | | | `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.
* Set `sx-request-api-root` to use `https` instead of `http`.Jonathan Leech-Pepin2014-11-141-1/+1
| | | | This will prevent loss of authentication token when using authentication.
* Clean content at the request levelSean Allred2014-11-141-1/+1
|
* Remove spurious lineSean Allred2014-11-121-1/+0
|
* Update code to new assoc-letArtur Malabarba2014-11-121-4/+5
|
* Simplify logical structureSean Allred2014-11-111-1/+1
|
* Include encoding functionsSean Allred2014-11-101-0/+1
|
* Proper GZIP testingSean Allred2014-11-101-17/+11
| | | | | | | 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
* Merge branch 'master' into initializationSean Allred2014-11-081-1/+0
|\ | | | | | | | | Conflicts: sx-request.el
| * Consolidate keywords, update emailsSean Allred2014-11-081-2/+1
| |
* | Use macroSean Allred2014-11-081-12/+10
| |
* | Abstract out method callsSean Allred2014-11-081-67/+31
| | | | | | | | | | | | | | | | | | | | | | 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'.