def remove_member(self, **kwargs):
     util.require_keys(kwargs, "channel_id")
     util.require_keys(kwargs, "member_id")
     return self.delete_request(
         "/chat/channels/{}/members/{}".format(kwargs.get("channel_id"),
                                               kwargs.get("member_id")),
         params=kwargs,
     )
예제 #2
0
 def get_user_report(self, **kwargs):
     util.require_keys(kwargs, ["user_id", "start_time", "end_time"])
     kwargs["from"] = util.date_to_str(kwargs["start_time"])
     del kwargs["start_time"]
     kwargs["to"] = util.date_to_str(kwargs["end_time"])
     del kwargs["end_time"]
     return self.get_request("/report/users/{}/meetings".format(
         kwargs.get("user_id")),
                             params=kwargs)
예제 #3
0
 def list(self, **kwargs):
     util.require_keys(kwargs, "host_id")
     start = kwargs.pop("start", None)
     if start:
         kwargs["from"] = util.date_to_str(start)
     end = kwargs.pop("end", None)
     if end:
         kwargs["to"] = util.date_to_str(end)
     return self.post_request("/recording/list", params=kwargs)
예제 #4
0
 def list(self, **kwargs):
     util.require_keys(kwargs, "user_id")
     start = kwargs.pop("start", None)
     if start:
         kwargs["from"] = util.date_to_str(start)
     end = kwargs.pop("end", None)
     if end:
         kwargs["to"] = util.date_to_str(end)
     return self.get_request("/users/{}/recordings".format(
         kwargs.get("user_id")),
                             params=kwargs)
    def delete(self, **kwargs) -> requests.Response:
        """
        https://marketplace.zoom.us/docs/api-reference/zoom-api/chat-messages/deletechatmessage#request-parameters

        Use params=kwargs

        Examples:

        https://api.zoom.us/v2/chat/users/me/messages/{message_id}?to_channel={some_channel_id}

        https://api.zoom.us/v2/chat/users/me/messages/{message_id}?to_contact={some_contact_id}
        """
        require_keys(kwargs, "message_id")
        return self.delete_request("/chat/users/me/messages/{}".format(
            kwargs.get("message_id")),
                                   params=kwargs)
    def list(self, **kwargs) -> requests.Response:
        """
        https://marketplace.zoom.us/docs/api-reference/zoom-api/chat-messages/getchatmessages#request-parameters

        Use params=kwargs

        Examples:

        https://api.zoom.us/v2/chat/users/{user_id}/messages?to_channel={some_channel_id}

        https://api.zoom.us/v2/chat/users/{user_id}/messages?to_contact={some_contact_id}
        """
        require_keys(kwargs, "user_id")
        return self.get_request(
            "/chat/users/{}/messages?page_size=50".format(
                kwargs.get("user_id")),
            params=kwargs,
        )
    def post(self, **kwargs) -> requests.Response:
        """
        https://marketplace.zoom.us/docs/api-reference/zoom-api/chat-messages/sendachatmessage#request-body

        Use data=kwargs

        Examples:

        https://api.zoom.us/v2/chat/users/me/messages

        body: {
            "message": {some_message},
            "to_channel": {some_channel_id}
        }

        body: {
            "message": {some_message},
            "to_contact": {some_contact_id}
        }
        """
        require_keys(kwargs, "message")
        return self.post_request("/chat/users/me/messages", data=kwargs)
    def update(self, **kwargs) -> requests.Response:
        """
        https://marketplace.zoom.us/docs/api-reference/zoom-api/chat-messages/editmessage#request-body

        Use data=kwargs

        Examples:

        https://api.zoom.us/v2/chat/users/me/messages/{messageId}

        body: {
            "message": {some_message},
            "to_channel": {some_channel_id}
        }

        body: {
            "message": {some_message},
            "to_contact": {some_contact_id}
        }
        """
        require_keys(kwargs, "message_id")
        return self.put_request("/chat/users/me/messages/{}".format(
            kwargs.get("message_id")),
                                data=kwargs)
예제 #9
0
 def list_members(self, **kwargs):
     util.require_keys(kwargs, "channel_id")
     return self.get_request("/chat/channels/{}/members".format(
         kwargs.get("channel_id")),
                             params=kwargs)
예제 #10
0
 def update(self, **kwargs):
     util.require_keys(kwargs, ["channel_id", "name"])
     return self.patch_request("/chat/channels/{}".format(
         kwargs.get("channel_id")),
                               data=kwargs)
예제 #11
0
 def delete(self, **kwargs):
     util.require_keys(kwargs, "channel_id")
     return self.delete_request("/chat/channels/{}".format(
         kwargs.get("channel_id")),
                                params=kwargs)
예제 #12
0
 def list(self, **kwargs):
     util.require_keys(kwargs, "user_id")
     return self.get_request("/chat/users/{}/messages".format(
         kwargs.get("user_id")),
                             params=kwargs)
예제 #13
0
 def create(self, **kwargs):
     util.require_keys(kwargs, ["name", "type", "members"])
     return self.post_request("/chat/users/me/channels", data=kwargs)
예제 #14
0
 def delete(self, **kwargs):
     util.require_keys(kwargs, "meeting_id")
     return self.delete_request("/meetings/{}/recordings".format(
         kwargs.get("meeting_id")),
                                params=kwargs)
예제 #15
0
 def join(self, **kwargs):
     require_keys(kwargs, "channelId")
     return self.post_request("/chat/channels/{}/members/me".format(
         kwargs.get("channelId")),
                              params=kwargs)
예제 #16
0
 def join(self, **kwargs):
     util.require_keys(kwargs, "channel_id")
     return self.post_request("/chat/channels/{}/members/me".format(
         kwargs.get("channel_id")),
                              data=kwargs)
예제 #17
0
 def get(self, **kwargs):
     util.require_keys(kwargs, ["meeting_id"])
     return self.post_request("/recording/get", params=kwargs)
예제 #18
0
파일: meeting.py 프로젝트: xilingl1/zoomapi
 def get(self, **kwargs):
     util.require_keys(kwargs, "id")
     return self.get_request("/meetings/{}".format(kwargs.get("id")),
                             params=kwargs)
예제 #19
0
파일: meeting.py 프로젝트: xilingl1/zoomapi
 def update(self, **kwargs):
     util.require_keys(kwargs, "id")
     if kwargs.get("start_time"):
         kwargs["start_time"] = util.date_to_str(kwargs["start_time"])
     return self.patch_request("/meetings/{}".format(kwargs.get("id")),
                               params=kwargs)
예제 #20
0
파일: meeting.py 프로젝트: xilingl1/zoomapi
 def end(self, **kwargs):
     util.require_keys(kwargs, ["id", "host_id"])
     return self.post_request("/meeting/end", params=kwargs)
예제 #21
0
파일: meeting.py 프로젝트: xilingl1/zoomapi
 def create(self, **kwargs):
     util.require_keys(kwargs, ["host_id", "topic", "type"])
     if kwargs.get("start_time"):
         kwargs["start_time"] = util.date_to_str(kwargs["start_time"])
     return self.post_request("/meeting/create", params=kwargs)
예제 #22
0
 def update(self, **kwargs):
     require_keys(kwargs, "channelId")
     return self.patch_request("/chat/channels/{}".format(
         kwargs.get("channelId")),
                               data=kwargs)
예제 #23
0
 def remove(self, **kwargs):
     require_keys(kwargs, ["channelId", "memberId"])
     return self.delete_request("/chat/channels/{}/members/{}".format(
         kwargs.get("channelId"), kwargs.get("memberId")),
                                params=kwargs)
예제 #24
0
 def leave(self, **kwargs):
     require_keys(kwargs, "channelId")
     return self.delete_request("/chat/channels/{}/members/me".format(
         kwargs.get("channelId")),
                                params=kwargs)
예제 #25
0
 def leave(self, **kwargs):
     util.require_keys(kwargs, "channel_id")
     return self.delete_request("/chat/channels/{}/members/me".format(
         kwargs.get("channel_id")))
예제 #26
0
 def post(self, **kwargs):
     util.require_keys(kwargs, "message")
     return self.post_request("/chat/users/me/messages", data=kwargs)
예제 #27
0
 def put(self, **kwargs):
     util.require_keys(kwargs, ["message_id", "message"])
     return self.put_request("/chat/users/me/messages/{}".format(
         kwargs.get("message_id")),
                             data=kwargs)
예제 #28
0
 def delete(self, **kwargs):
     util.require_keys(kwargs, "message_id")
     return self.delete_request("/chat/users/me/messages/{}".format(
         kwargs.get("message_id")),
                                params=kwargs)
예제 #29
0
파일: meeting.py 프로젝트: xilingl1/zoomapi
 def list(self, **kwargs):
     util.require_keys(kwargs, "host_id")
     if kwargs.get("start_time"):
         kwargs["start_time"] = util.date_to_str(kwargs["start_time"])
     return self.post_request("/meeting/list", params=kwargs)
예제 #30
0
 def invite(self, **kwargs):
     require_keys(kwargs, ["channelId", "members"])
     return self.post_request("/chat/channels/{}/members".format(
         kwargs.get("channelId")),
                              data=kwargs)