def get_reply_put_response(self, user, text):
     url = build_discussion_detail_url(self, 'reply')
     data = {
         'parent': self.comment.id,
         'text': text
     }
     response = get_authenticated_put_response(
         user,
         url,
         data,
         content_type='application/json'
     )
     return response
 def get_thread_put_response(self, user, text):
     url = build_discussion_detail_url(self, 'thread')
     data = {
         'title': text,
         'text': text
     }
     response = get_authenticated_put_response(
         user,
         url,
         data,
         content_type='application/json'
     )
     return response
 def get_comment_vote_delete_response(self, user):
     url = build_discussion_detail_url(self, 'comment')
     response = self.get_vote_delete_response(user, url)
     return response
 def get_reply_flag_delete_response(self, user):
     url = build_discussion_detail_url(self, 'reply')
     response = self.get_flag_delete_response(user, url)
     return response
 def get_thread_endorsement_delete_response(self, user):
     url = build_discussion_detail_url(self, 'thread')
     response = self.get_endorsement_delete_response(user, url)
     return response
 def get_request_config(self, discussion_type, text):
     url = build_discussion_detail_url(self, discussion_type)
     data = {'text': text}
     return url, data
 def get_reply_downvote_post_response(self, user):
     url = build_discussion_detail_url(self, 'reply')
     response = self.get_downvote_response(user, url)
     return response
 def get_reply_flag_post_response(self, user):
     url = build_discussion_detail_url(self, 'reply')
     reason = 'This reply is inappropriate'
     response = self.get_flag_response(user, url, reason)
     return response
 def get_thread_upvote_post_response(self, user):
     url = build_discussion_detail_url(self, 'thread')
     response = self.get_upvote_response(user, url)
     return response