Skip to content

Commit 2947b4c

Browse files
joaojcortes
authored andcommitted
feat: add zoom admin actions
1 parent fb1c64a commit 2947b4c

File tree

3 files changed

+94
-0
lines changed

3 files changed

+94
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import get from "lodash/get.js";
2+
import { paginate } from "../../common/pagination.mjs";
3+
import zoomAdmin from "../../zoom_admin.app.mjs";
4+
5+
export default {
6+
name: "Get meeting recordings",
7+
description:
8+
"Get all recordings of a meeting. [See the docs here](https://developers.zoom.us/docs/api/meetings/#tag/cloud-recording/GET/meetings/{meetingId}/recordings)",
9+
key: "zoom_admin-get-meeting-recordings",
10+
version: "0.0.1",
11+
type: "action",
12+
props: {
13+
zoomAdmin,
14+
meeting: {
15+
propDefinition: [
16+
zoomAdmin,
17+
"meeting",
18+
],
19+
},
20+
downloadAccessToken: {
21+
type: "boolean",
22+
label: "Download Access Token",
23+
description: "Whether to include the download access token in the response",
24+
optional: true,
25+
},
26+
},
27+
async run({ $ }) {
28+
const res = await paginate(
29+
this.zoomAdmin.listMeetingRecordings,
30+
"recordings",
31+
get(this.meeting, "value", this.meeting),
32+
{
33+
download_access_token: this.downloadAccessToken,
34+
},
35+
);
36+
37+
$.export("$summary", `"${get(this.meeting, "label", this.meeting)}" meeting recordings successfully fetched`);
38+
39+
return res;
40+
},
41+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import zoomAdmin from "../../zoom_admin.app.mjs";
2+
import get from "lodash/get.js";
3+
import { paginate } from "../../common/pagination.mjs";
4+
5+
export default {
6+
name: "List past meeting participants",
7+
description:
8+
"List all participants of a past meeting. [See the docs here](https://developers.zoom.us/docs/api/meetings/#tag/meetings/GET/past_meetings/{meetingId}/participants)",
9+
key: "zoom_admin-list-past-meeting-participants",
10+
version: "0.0.1",
11+
type: "action",
12+
props: {
13+
zoomAdmin,
14+
meeting: {
15+
propDefinition: [
16+
zoomAdmin,
17+
"meeting",
18+
],
19+
},
20+
},
21+
async run({ $ }) {
22+
const res = await paginate(
23+
this.zoomAdmin.listPastMeetingParticipants,
24+
"participants",
25+
get(this.meeting, "value", this.meeting),
26+
);
27+
28+
$.export("$summary", `"${get(this.meeting, "label", this.meeting)}" past meeting participants successfully fetched`);
29+
30+
return res;
31+
},
32+
};

components/zoom_admin/zoom_admin.app.mjs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,4 +392,25 @@ export default {
392392
return data;
393393
},
394394
},
395+
async listPastMeetingParticipants(meetingId, nextPageToken) {
396+
const { data } = await this._makeRequest({
397+
path: `/past_meetings/${meetingId}/participants`,
398+
params: {
399+
page_size: 100,
400+
next_page_token: nextPageToken,
401+
},
402+
});
403+
return data;
404+
},
405+
async listMeetingRecordings(meetingId, params, nextPageToken) {
406+
const { data } = await this._makeRequest({
407+
path: `/meetings/${meetingId}/recordings`,
408+
params: {
409+
page_size: 100,
410+
next_page_token: nextPageToken,
411+
...params,
412+
},
413+
});
414+
return data;
415+
},
395416
};

0 commit comments

Comments
 (0)