Skip to content

Instantly share code, notes, and snippets.

@leviroth
Last active March 7, 2017 15:42
Show Gist options
  • Save leviroth/5ec7a04d7900b7c7755af3d8f33c7441 to your computer and use it in GitHub Desktop.
Save leviroth/5ec7a04d7900b7c7755af3d8f33c7441 to your computer and use it in GitHub Desktop.
Reddit new modmail API response examples
conversation:
{'authors': [{'id': 56923181,
'isAdmin': False,
'isDeleted': False,
'isHidden': False,
'isMod': True,
'isOp': False,
'isParticipant': False,
'name': 'BJO_test_mod'},
{'id': 56922862,
'isAdmin': False,
'isDeleted': False,
'isHidden': False,
'isMod': False,
'isOp': True,
'isParticipant': False,
'name': 'BJO_test_user'},
{'id': 5134815,
'isAdmin': False,
'isDeleted': False,
'isHidden': False,
'isMod': True,
'isOp': False,
'isParticipant': False,
'name': 'TheGrammarBolshevik'}],
'id': 'ik72',
'isAuto': False,
'isHighlighted': False,
'isInternal': False,
'isRepliable': True,
'lastModUpdate': '2017-03-07T15:36:18.387648+00:00',
'lastUnread': None,
'lastUpdated': '2017-03-07T15:36:18.387648+00:00',
'lastUserUpdate': '2017-03-07T15:28:19.342937+00:00',
'numMessages': 2,
'objIds': [{'id': 'uui4', 'key': 'messages'},
{'id': 'uuln', 'key': 'messages'},
{'id': 'bmb6', 'key': 'modActions'}],
'owner': {'displayName': 'ThirdRealm', 'id': 't5_390u2', 'type': 'subreddit'},
'participant': {},
'state': 2,
'subject': 'This is an outrage!'}
messages:
{'uui4': {'author': {'id': 56922862,
'isAdmin': False,
'isDeleted': False,
'isHidden': False,
'isMod': False,
'isOp': True,
'isParticipant': False,
'name': 'BJO_test_user'},
'body': '<!-- SC_OFF --><div class="md"><p>How dare you ban <a '
'href="/r/ThirdRealm">/r/ThirdRealm</a>&#39;s most prolific '
'poster?</p>\n'
'</div><!-- SC_ON -->',
'bodyMarkdown': "How dare you ban /r/ThirdRealm's most prolific "
'poster?',
'date': '2017-03-07T15:28:19.342937+00:00',
'id': 'uui4',
'isInternal': False},
'uuln': {'author': {'id': 56923181,
'isAdmin': False,
'isDeleted': False,
'isHidden': False,
'isMod': True,
'isOp': False,
'isParticipant': False,
'name': 'BJO_test_mod'},
'body': '<!-- SC_OFF --><div class="md"><p>Tough cookies.</p>\n'
'</div><!-- SC_ON -->',
'bodyMarkdown': 'Tough cookies.',
'date': '2017-03-07T15:36:18.387648+00:00',
'id': 'uuln',
'isInternal': False}}
modActions:
{'bmb6': {'actionTypeId': 2,
'author': {'id': 5134815,
'isAdmin': False,
'isDeleted': False,
'isHidden': False,
'isMod': True,
'name': 'TheGrammarBolshevik'},
'date': '2017-03-07T15:41:54.042442+00:00',
'id': 'bmb6'}}
user:
{'banStatus': {'endDate': None,
'isBanned': True,
'isPermanent': True,
'reason': ''},
'created': '2016-05-12T23:42:30.337289+00:00',
'id': 't2_xw1ym',
'isShadowBanned': False,
'isSuspended': False,
'muteStatus': {'endDate': None, 'isMuted': False, 'reason': ''},
'name': 'BJO_test_user',
'recentComments': {'t1_dcmp9du': {'comment': "OK, that's fantastic. Let me "
'try replying.',
'date': '2017-01-19T15:30:14.741569+00:00',
'permalink': 'https://www.reddit.com/r/ThirdRealm/comments/5ox5zg/a_sample_post/dcmp9du/',
'title': 'A sample post'}},
'recentConvos': {'ik72': {'date': '2017-03-07T15:28:19.342937+00:00',
'id': 'ik72',
'permalink': 'https://mod.reddit.com/mail/perma/ik72',
'subject': 'This is an outrage!'},
'ik9t': {'date': '0001-01-01T00:00:00+00:00',
'id': 'ik9t',
'permalink': 'https://mod.reddit.com/mail/perma/ik9t',
'subject': "You've been banned from participating "
'in r/ThirdRealm'}},
'recentPosts': {'t3_5x51u0': {'date': '2017-03-02T18:43:15.513237+00:00',
'permalink': 'https://www.reddit.com/r/ThirdRealm/comments/5x51u0/mental_health_comment_test/',
'title': 'Mental health comment test'},
't3_5x52d7': {'date': '2017-03-02T18:45:33.069013+00:00',
'permalink': 'https://www.reddit.com/r/ThirdRealm/comments/5x52d7/second_test_of_mental_health_thing/',
'title': 'Second test of mental health thing'},
't3_5xtlly': {'date': '2017-03-06T14:52:04.116617+00:00',
'permalink': 'https://www.reddit.com/r/ThirdRealm/comments/5xtlly/test_for_new_report/',
'title': 'test for new report'}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment