aboutsummaryrefslogtreecommitdiff
path: root/sx-inbox.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-inbox.el')
-rw-r--r--sx-inbox.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/sx-inbox.el b/sx-inbox.el
index 5fb3652..3bc95c8 100644
--- a/sx-inbox.el
+++ b/sx-inbox.el
@@ -47,16 +47,19 @@
site.related_sites))
"Filter used when retrieving inbox items.")
-(defun sx-inbox-get (&optional page keywords)
+(defun sx-inbox-get (&optional notifications page keywords)
"Get an array of inbox items for the current user.
-Return an list of items. Each item is an alist of properties
+If NOTIFICATIONS is non-nil, query from `notifications' method,
+otherwise use `inbox' method.
+
+Return an array of items. Each item is an alist of properties
returned by the API.
See https://api.stackexchange.com/docs/types/inbox-item
KEYWORDS are added to the method call along with PAGE.
`sx-method-call' is used with `sx-inbox-filter'."
- (sx-method-call 'inbox
+ (sx-method-call (if notifications 'notifications 'inbox)
:keywords keywords
:filter sx-inbox-filter))