예제 #1
0
def main():
    zoom = Zoom(ZOOM_API_KEY, ZOOM_API_SECRET)
    jwt_token: bytes = bytes(JWT_TOKEN, encoding='utf8')
    response: Response = zoom.get_meeting_participants(ZOOM_MEETING_ID,
                                                       jwt_token)
    print(response)
    list_of_participants: List[dict] = response.json().get("participants")
    while token := response.json().get("next_page_token"):
        response = zoom.get_meeting_participants(ZOOM_MEETING_ID, jwt_token,
                                                 token)
        list_of_participants += response.json().get("participants")
예제 #2
0
ZOOM_API_KEY = os.environ.get("ZOOM_API_KEY")
ZOOM_API_SECRET = os.environ.get("ZOOM_API_SECRET")
ZOOM_MEETING_ID = os.environ.get("ZOOM_MEETING_ID")

SERVICE_ACCOUNT_FILE = f".secrets/{os.listdir('.secrets')[0]}"
SCOPES = [
    "https://www.googleapis.com/auth/drive",
    "https://www.googleapis.com/auth/drive.file"
]

if __name__ == "__main__":
    zoom = Zoom(ZOOM_API_KEY, ZOOM_API_SECRET)

    jwt_token: bytes = zoom.generate_jwt_token()
    response: Response = zoom.get_meeting_participants(ZOOM_MEETING_ID,
                                                       jwt_token)
    list_of_participants: List[dict] = response.json().get("participants")

    while token := response.json().get("next_page_token"):
        response = zoom.get_meeting_participants(ZOOM_MEETING_ID, jwt_token,
                                                 token)
        list_of_participants += response.json().get("participants")

    df: DataFrame = pd.DataFrame(list_of_participants).drop(
        columns=["attentiveness_score"])
    df.join_time = pd.to_datetime(
        df.join_time).dt.tz_convert("Australia/Sydney")
    df.leave_time = pd.to_datetime(
        df.leave_time).dt.tz_convert("Australia/Sydney")

    df.sort_values(["id", "name", "join_time"], inplace=True)