Skip to content
talklittle edited this page Sep 13, 2010 · 2 revisions

http://www.reddit.com/message/inbox/.json

Retrieving the JSON will also change a message’s status from “new”: true to “new”: false. Want to avoid this until user actually checks mail.

Well in that case, in order to highlight the “new” ones, I need to store the JSON somewhere….

OR, probably better option, use pattern matching again. use /stats as usual. there will be class=“nohavemail” in the link to /message/inbox. If you do have mail, it will be class=“havemail” after byte 10000

So, to save a little bandwidth, how often to peek inbox?
• Definitely every time you start an Activity or login.
○ Change reddit
○ Login
○ Go to comments thread
• Can piggyback off of doUpdateModhash()
• In the future, an option to have a service to check when reddit is fun isn’t running.

Empty inbox:
{"kind": “Listing”, “data”: {"after": null, “children”: [], “before”: null}}

Not logged in:
""

Clone this wiki locally