-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
What would need to be done to allow fetching from a user's Multireddit?
I had issues with the fetching part itself. I tried two alternatives, without success:
- fetching from "user/USERNAME/m/MULTINAME/top" + ".json"
- do an OAUTH backed request to the same URL, but prefixed "https://oauth.reddit.com/", with the following code
(request-response-data
(request "https://oauth.reddit.com/user/USERNAME/m/MULTINAME/top"
:complete
(cl-function
(lambda (&rest data &allow-other-keys)
(print data)
))
:sync nil
:type "GET"
:parser #'json-read
:headers `(
("User-Agent" . "md4rd")
("Authorization" . ,(format "bearer %s" md4rd--oauth-access-token))
)
))
It seems that md4rd parses JSON by fetching from an URL of a Reddit sub, adding ".json" at the end. Note that this method works for multireddits as well, in the browser, but not in Emacs (i.e. when called the same way as done in md4rd).
I couldn't find any super-helpful info in the official API docs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels