Ejemplo n.º 1
0
 def set_conversation_notification_level(
         self, set_conversation_notification_level_request):
     """Set the notification level of a conversation."""
     response = hangouts_pb2.SetConversationNotificationLevelResponse()
     yield from self._pb_request(
         'conversations/setconversationnotificationlevel',
         set_conversation_notification_level_request, response)
     return response
Ejemplo n.º 2
0
    def setconversationnotificationlevel(self, conversation_id, level):
        """Set the notification level of a conversation.

        Pass hangouts_pb2.NOTIFICATION_LEVEL_QUIET to disable notifications, or
        hangouts_pb2.NOTIFICATION_LEVEL_RING to enable them.

        Raises hangups.NetworkError if the request fails.
        """
        request = hangouts_pb2.SetConversationNotificationLevelRequest(
            request_header=self._get_request_header_pb(),
            conversation_id=hangouts_pb2.ConversationId(id=conversation_id),
            level=level,
        )
        response = hangouts_pb2.SetConversationNotificationLevelResponse()
        yield from self._pb_request(
            'conversations/setconversationnotificationlevel', request, response
        )
        return response