aboutsummaryrefslogtreecommitdiff
path: root/sx-method.el
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'organize' of github.com:vermiculus/sx.el into organizeSean Allred2015-01-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sx-cache.el sx-encoding.el sx-favorites.el sx-filter.el sx-interaction.el sx-method.el sx-question-list.el sx-question-mode.el sx-question-print.el sx-question.el sx-tab.el sx-time.el sx.el
| * Standardize local variablesSean Allred2014-12-011-1/+5
| | | | | | | | | | - Move lexical-binding to top of file; fixes #123 - Use indent-tabs-mode: nil for all files
* | 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-3/+3
| |
* | Add page and pagesize only if not already presentSean Allred2015-01-041-2/+7
| |
* | Introduce :page and :pagesize into sx-method-callSean Allred2015-01-031-0/+6
| | | | | | | | | | | | Default page size is 100 to reduce number of overall requests made. Fixes #190.
* | Simplfy logicSean Allred2015-01-031-4/+2
| | | | | | | | | | `get-all' will be re-bound to either a function or nil, so using `or' with it is appropriate.
* | Use `push' instead of `setq'Sean Allred2015-01-031-5/+2
| |
* | Simplify formSean Allred2015-01-031-2/+1
| | | | | | | | | | | | If it's `t', then we still have our desired behavior. If it's not `t', then we just have 'it' -- when 'it' is `nil' (note, also not `t'), we obviously have `nil'. The behavior has not changed through this patch.
* | Remove superfluous local variableSean Allred2015-01-031-5/+4
| |
* | Analog of request-all-items for sx-method-callSean Allred2015-01-021-2/+28
| |
* | user-error is "not known to be defined" in emacs 24.2Artur Malabarba2014-12-151-1/+1
| |
* | Autoload sx-authenticateArtur Malabarba2014-12-121-1/+1
| | | | | | | | | | | | | | | | | | This also removes the sx-authenticate alias and renames sx-auth-authenticate to sx-authenticate. I did this because I felt it wasn't helpful to have both. Whenever I hit `M-x sx-au <TAB>` the only completions offered were two identical, but differently named, commands. That's useless at best, confusing at worst.
* | Improve some header comments.Artur Malabarba2014-12-061-1/+1
|/
* Fix byte-compile warningsArtur Malabarba2014-11-291-1/+2
| | | | Fixes #115
* Function quote sx-request-makeArtur Malabarba2014-11-271-1/+1
|
* Don't do this patch when POSTingArtur Malabarba2014-11-261-2/+8
|
* Make site a url argumentArtur Malabarba2014-11-261-5/+5
| | | | | | | | | | This addresses the apparent api bug which affected both the retrieval of favorites and the site-switching. Se #82 As far as I can see, this issue affects ALL api calls, so it seems reasonable that it should be fixed inside `sx-method-call`. The usage of sx-method-call stays the same, only the internal has changed.
* Fixes #92. Change default filter from `'none` to `'(())`.Jonathan Leech-Pepin2014-11-261-1/+1
|
* Whitespace fixup (spaces not tabs).Jonathan Leech-Pepin2014-11-211-21/+21
|
* Use `\(` for ( at beginning of line in docstring.Jonathan Leech-Pepin2014-11-211-1/+1
|
* Use `(declare (indent 1)) in `sx-method-call`.Jonathan Leech-Pepin2014-11-211-0/+1
|
* Whitespace/indent fixup.Jonathan Leech-Pepin2014-11-211-38/+38
|
* Update docstring to reflect uses of `AUTH`.Jonathan Leech-Pepin2014-11-211-0/+15
|
* Merge branch 'master' into sx-method-auth. Conflicts have beenJonathan Leech-Pepin2014-11-211-1/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+2
| |
| * Merge branch 'master' into documentationSean Allred2014-11-191-2/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sx-method.el sx-question-list.el sx-question-mode.el sx-question.el sx-request.el sx.el
| * | Simplify `sx-method-call'Sean Allred2014-11-181-6/+2
| | | | | | | | | | | | | | | | | | We aren't using `stack-filter' anymore (in fact, we haven't since filters became functional). Somehow it survived refactoring; this commit fixes that oversight.
| * | Documentation -- part twoSean Allred2014-11-181-1/+6
| | | | | | | | | | | | Pushing this change to continue work elsewhere.
| * | Documentation -- part oneSean Allred2014-11-171-5/+3
| | | | | | | | | | | | Pushing this change to continue work elsewhere.
* | | Remove default site specification. Defaults to nil if notJonathan Leech-Pepin2014-11-201-2/+2
| | | | | | | | | | | | | | | | | | specified (for network-wide searches). Remove :warning, drop back to :debug
* | | sx-method-call rewritten and associated improvements in sx-request.Jonathan Leech-Pepin2014-11-201-20/+54
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | Update `sx-method-call` to use `need-auth` and `use-post` variables whenJonathan Leech-Pepin2014-11-171-2/+11
|/ | | | creating a request.
* Update commentsSean Allred2014-11-081-3/+3
|
* Merge branch 'master' into initializationSean Allred2014-11-081-1/+0
| | | | | Conflicts: sx-request.el
* Abstract out method callsSean Allred2014-11-081-0/+48
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'.