How to use the zoomus.util.require_keys function in zoomus

To help you get started, we’ve selected a few zoomus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github actmd / zoomus / tests / zoomus / test_util.py View on Github external
def test_can_require_keys_with_single_string_key(self):
        d = {"a": 1}
        with self.assertRaises(ValueError) as context:
            util.require_keys(d, "b")
            self.assertEqual(context.exception.message, "'b' must be set")
github actmd / zoomus / zoomus / components / report.py View on Github external
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
        )
github actmd / zoomus / zoomus / components / recording.py View on Github external
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
        )
github actmd / zoomus / zoomus / components / recording.py View on Github external
def get(self, **kwargs):
        util.require_keys(kwargs, ["meeting_id"])
        return self.post_request("/recording/get", params=kwargs)
github actmd / zoomus / zoomus / components / webinar.py View on Github external
def end(self, **kwargs):
        util.require_keys(kwargs, ["id", "host_id"])
        return self.post_request("/webinar/end", params=kwargs)
github actmd / zoomus / zoomus / components / webinar.py View on Github external
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("/webinar/list", params=kwargs)
github actmd / zoomus / zoomus / components / user.py View on Github external
def delete(self, **kwargs):
        util.require_keys(kwargs, "id")
        return self.post_request("/user/delete", params=kwargs)
github actmd / zoomus / zoomus / components / meeting.py View on Github external
def end(self, **kwargs):
        util.require_keys(kwargs, ["id", "host_id"])
        return self.post_request("/meeting/end", params=kwargs)
github actmd / zoomus / zoomus / components / user.py View on Github external
def update(self, **kwargs):
        util.require_keys(kwargs, "id")
        return self.post_request("/user/update", params=kwargs)
github actmd / zoomus / zoomus / components / user.py View on Github external
def cust_create(self, **kwargs):
        util.require_keys(kwargs, ["type", "email"])
        return self.post_request("/user/custcreate", params=kwargs)