diff --git a/api/ECNQueue.py b/api/ECNQueue.py index ae6c424..d9c1b45 100644 --- a/api/ECNQueue.py +++ b/api/ECNQueue.py @@ -652,10 +652,43 @@ def __statusParsing(self, content: list, lineNum: int) -> dict: return statusInfo def __userReplyParsing(self, replyContent: list, lineNumber: int) -> dict: - """Returns a dictionary with user Reply information information + """Returns a dictionary with user reply information + + Example: + === Additional information supplied by user ===\n + \n + Subject: Re: Beepboop\n + From: Justin Campbell \n + Date: Tue, 23 Jun 2020 13:30:45 -0400\n + X-ECN-Queue-Original-Path: /home/pier/e/queue/Attachments/inbox/2020-06-23/212-original.txt\n + X-ECN-Queue-Original-URL: https://engineering.purdue.edu/webqueue/Attachments/inbox/2020-06-23/212-original.txt\n + \n + Huzzah!\n + \n + ===============================================\n + \n + Args: + replyContent (list): The entire section of a reply-from-user + lineNumber (int): The line number of the begining of a reply-from-user section within and item Returns: - dictionary: "type": "replyFromUser", datetime, subject, userName, userEmail, content, ccRecipients + dict: a dictionary with these keys, + "type": "reply_from_user", + "from_name": name of the user that sent the reply, + "from_email": email of the user that sent the reply, + "subject": subject of the reply, + "datetime": the datetime of the reply, + "cc": [ + {"name": name of the carbon copied recipient, + "email": email of the carbon copied recipient + }, + ] + "content": content of the reply + "headers": [ + {"type": headerType, + "content": content + }, + ] """ replyFromInfo = {}