aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix auth settings in calls. Do not use 'warn in non-interactive commands.Jonathan Leech-Pepin2014-11-204-4/+4
|
* Uses of `sx-method-call` have been updated to use new format.Jonathan Leech-Pepin2014-11-204-20/+24
| | | | | | | | sx-question now includes 2 authentication requiring parameters, `question.upvoted` and `question.downvoted`. These will only be used if access token exists. sx-favorites still uses site-workaround pending #82.
* 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-202-61/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Improve method for returning clean filter.Jonathan Leech-Pepin2014-11-201-12/+21
| | | | | Logic now verifies `include` if `include`,`exclude`,`base` is used. Otherwise verify entire filter.
* Do not actually need to check for no submethods. Already tested for.Jonathan Leech-Pepin2014-11-201-2/+1
|
* Fix sx-auth--method-p to work correctly when there is no submethodJonathan Leech-Pepin2014-11-201-2/+4
| | | | specified.
* Fix filter logic to account for alist of properties.Jonathan Leech-Pepin2014-11-201-11/+22
| | | | | | | sx-auth-filter-auth now returns a filter that will not require auth for use when auth not available. Add a few known auth-required types.
* Implement checking for filter and method authentication requirement.Jonathan Leech-Pepin2014-11-191-0/+68
| | | | | Currently no filter items are defined pending confirmation of which require it.
* Fix missing dependencyArtur Malabarba2014-11-191-1/+1
|
* Add some package definitions.Artur Malabarba2014-11-191-12/+31
| | | | Also run checkdoc on sx.el
* Merge pull request #76 from vermiculus/mark-read-keySean Allred2014-11-181-0/+13
|\ | | | | Mark as read with "m"
| * Mark as read with "m"Artur Malabarba2014-11-191-0/+13
|/ | | | Fixes #61
* Merge pull request #71 from vermiculus/hidden-questionsSean Allred2014-11-183-4/+78
|\ | | | | Hidden questions
| * Merge branch 'master' into hidden-questionsArtur Malabarba2014-11-182-57/+79
| |\
| * | Hidden question functionality implemented in the question listArtur Malabarba2014-11-181-1/+14
| | |
| * | Implement hidden question databaseArtur Malabarba2014-11-181-3/+49
| | | | | | | | | | | | Also improve read question code.
| * | Define sorted insertion macro.Artur Malabarba2014-11-181-0/+15
| | |
* | | Merge pull request #73 from jleechpe/invalidate-cacheSean Allred2014-11-181-0/+25
|\ \ \ | | | | | | | | Provide cache invalidation
| * | | Use `cl-remove-if` rather than `remove-if`Jonathan Leech-Pepin2014-11-181-1/+1
| | | |
| * | | Fix docstring.Jonathan Leech-Pepin2014-11-181-2/+1
| | | |
| * | | Provide cache invalidationJonathan Leech-Pepin2014-11-181-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (sx-cache--invalidate): Invalidate provided cache. Allows for invalidating variables associated with cache using `makunbound`. Cache can be reinitialized using arg `init-method`. (sx-cache-invalidate-all): Invalidate all caches then call `sx-initialize` to reinitialize. Arg `save-auth` prevents access_token from being lost.
* | | | QUICK-FIX: Link regexp Fixes #74Artur Malabarba2014-11-181-1/+1
| | | |
* | | | Merge pull request #72 from jleechpe/sx-questions-show-favoriteArtur Malabarba2014-11-181-26/+38
|\ \ \ \ | |/ / / |/| | | Implements indication of starred questions in question-list
| * | | Implements indication of starred questions in question-listJonathan Leech-Pepin2014-11-181-26/+38
| | |/ | |/| | | | | | | | | | | | | | | | `sx-question-list-favorite` inherits face from `sx-question-list-score-upvoted` Favorite is displayed using char \x2b26 WHITE MEDIUM DIAMOND.
* | | Merge pull request #70 from jleechpe/sx-networksSean Allred2014-11-182-34/+34
|\ \ \ | |/ / |/| | Update sx-networks and sx-favorites to use sx-initialize
| * | Replace (sx-favorites--ensure-favorite-list) with (sx-favorites--initialize).Jonathan Leech-Pepin2014-11-181-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | Simplify initialization since it is run at startup rather than tested for by functions. Clean up (sx-favorites--update-site-favorites) to provide the same values for new sites as for existing.
| * | Correct naming of cache to correspond to sx-cache-get.Jonathan Leech-Pepin2014-11-181-1/+1
| | |
| * | Fix logic for updating cache and setting variables.Jonathan Leech-Pepin2014-11-181-15/+17
|/ / | | | | | | | | Turned (sx-network--ensure-user) into (sx-network--initialize) and added as hook for initialization.
* | Merge pull request #69 from jleechpe/sx-networksSean Allred2014-11-182-0/+198
|\| | | | | Functionality for retrieving network information and keeping track of favorite questions.
| * GH comment fix:Jonathan Leech-Pepin2014-11-181-1/+1
| | | | | | | | Use sharp quote for function.
| * GH comment fixes:Jonathan Leech-Pepin2014-11-181-2/+2
| | | | | | | | | | Correct file header. Use sharp quote for function.
| * (sx-favorites--update-site-favorites): Change from (list ..) to (cons ..).Jonathan Leech-Pepin2014-11-181-1/+1
| |
| * Fixes as per Github commentsJonathan Leech-Pepin2014-11-181-5/+6
| | | | | | | | | | sx-favorites--user-favorite-list: Clarify docstring (sx-favorites--ensure-favorite-list): Remove extraneous argument
| * Fixes as per github comments.Jonathan Leech-Pepin2014-11-181-15/+15
| | | | | | | | | | | | | | | | | | (sx-network--get-associated): Ensure user-sites is also set when retrieving cache. (sx-network--ensure-user): Simplify. Used to ensure cache is loaded before attempting to use it. Fix quoted lambda in sx-network--map-site-url-to-site-api.
| * Refactor sx-network--get-associated to avoid double call toJonathan Leech-Pepin2014-11-182-5/+5
| | | | | | | | | | | | sx-cache-set. Fix provides lines (missed quote on symbol).
| * Fix mistakes:Jonathan Leech-Pepin2014-11-171-2/+3
| | | | | | | | | | - sx-network--user-information is a var not a function - remember to setq sx-network--user-sites.
| * Use sx-network--user-filter to include `user_type' property (non-default).Jonathan Leech-Pepin2014-11-171-1/+26
| |
| * Generate and update list of favorited questions.Jonathan Leech-Pepin2014-11-171-0/+87
| | | | | | | | | | | | | | | | sx-favorites--ensure-favorite-list: List of favorites in format (SITE QUESTION_ID QUESTION_ID ...). (sx-favorites--update-site-favorites): Update favorites for given SITE. (sx-favorites-update): Update favorites for all networks user has an account on.
| * Create `sx-networks` and the associated cache.Jonathan Leech-Pepin2014-11-171-0/+84
| | | | | | | | | | | | | | | | | | sx-network--user-information: User query from site. sx-network--user-sites: List of sites user is active on for use when querying sites. (sx-network--ensure-user): Ensures network-user cache is available for use. (sx-network--update): Retrieve most recent network user information.
* | Merge pull request #67 from vermiculus/question-mode-keybindings++Artur Malabarba2014-11-182-57/+79
|\ \ | |/ |/| Question mode keybindings++
| * Merge branch 'master' into question-mode-keybindings++Artur Malabarba2014-11-176-50/+92
| |\ | |/ |/|
* | Merge pull request #52 from jleechpe/sx-request-make-updateArtur Malabarba2014-11-173-44/+76
|\ \ | | | | | | Updated `sx-request-make` to use a consistent format for both `POST` and `GET` methods
| * | Update `sx-method-call` to use `need-auth` and `use-post` variables whenJonathan Leech-Pepin2014-11-171-2/+11
| | | | | | | | | | | | creating a request.
| * | 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.
| * | Merge branch 'master' into sx-request-make-updateJonathan Leech-Pepin2014-11-179-248/+343
| |\ \
| * | | 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
| | | |
| * | | Remove unneeded newlineJonathan Leech-Pepin2014-11-141-2/+1
| | | |
| * | | Updated `sx-request-make` to use a consistent format for both `POST` and ↵Jonathan Leech-Pepin2014-11-142-30/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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.