Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8c775f9
Generate the Ballerina clien
LinukaAr Jun 12, 2025
e1c5dcb
[Automated] Update the toml files
LinukaAr Jun 12, 2025
2e84333
[Automated] Update the toml files
LinukaAr Jun 12, 2025
29e40a8
add tests
LinukaAr Jun 16, 2025
5eede35
Regenarate files for updated bal version
LinukaAr Jun 19, 2025
699fdc7
Add tests
LinukaAr Jun 19, 2025
0ef3d5a
Update authentication mechanism
LinukaAr Jun 20, 2025
9005883
[Automated] Update the toml files
LinukaAr Jun 20, 2025
aa4c407
Address PR review comments
LinukaAr Jun 24, 2025
2fd43fd
Switch to zoom genaral app type
LinukaAr Jun 24, 2025
48868b7
[Automated] Update the toml files
LinukaAr Jun 24, 2025
4904d84
Add setup instructions
LinukaAr Jun 24, 2025
3d8747c
Add requested changes from code review
LinukaAr Jun 25, 2025
348c413
Change to specific types instead of json
LinukaAr Jun 25, 2025
530e29a
Update the cli command
LinukaAr Jun 25, 2025
7d7f878
Remove configurations related to tests
LinukaAr Jun 26, 2025
6a29409
Use markdown image syntax
LinukaAr Jun 26, 2025
285046f
Refactor error handling
LinukaAr Jun 26, 2025
a5d8608
Add missing details in doc
LinukaAr Jun 26, 2025
68bf4f1
Add sts service
LinukaAr Jun 27, 2025
084e64c
Update formatting in README
LinukaAr Jun 27, 2025
6b92ce7
Improve clarity in README files
LinukaAr Jun 27, 2025
82e7b1c
Merge branch 'ballerina-platform:main' into main
LinukaAr Jun 30, 2025
d0dfd00
Add examples for the connector
LinukaAr Jun 30, 2025
a260f5f
Add examples
LinukaAr Jun 30, 2025
0f1413c
Merge branch 'main' of https://github.com/LinukaAr/module-ballerinax-…
LinukaAr Jun 30, 2025
b1aa1c6
Address PR review comments
LinukaAr Jun 30, 2025
f3fc1e0
Add symlinks
LinukaAr Jun 30, 2025
22915d3
Refactor schedule segments
LinukaAr Jun 30, 2025
06968f7
Refactor event handling logic
LinukaAr Jun 30, 2025
2d4b664
Merge branch 'ballerina-platform:main' into main
LinukaAr Jun 30, 2025
7f5ee30
[Automated] Update the toml files
LinukaAr Jul 1, 2025
28a0425
Refactor Zoom client usage
LinukaAr Jul 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ dependencies = [
{org = "ballerina", name = "lang.value"},
{org = "ballerina", name = "observe"}
]
modules = [
{org = "ballerina", packageName = "log", moduleName = "log"}
]

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -272,9 +269,6 @@ dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"}
]
modules = [
{org = "ballerina", packageName = "os", moduleName = "os"}
]

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -338,8 +332,6 @@ dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "data.jsondata"},
{org = "ballerina", name = "http"},
{org = "ballerina", name = "log"},
{org = "ballerina", name = "os"},
{org = "ballerina", name = "test"},
{org = "ballerina", name = "url"},
{org = "ballerinai", name = "observe"}
Expand Down
44 changes: 22 additions & 22 deletions examples/availability-manager/main.bal
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ configurable string clientSecret = ?;
configurable string refreshToken = ?;
configurable string userId = ?;

final scheduler:Client zoomClient = check new ({
final zoom:Client zoomClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -32,40 +32,40 @@ final scheduler:Client zoomClient = check new ({
});

public function main() returns error? {
scheduler:InlineResponse2007 userInfo = check zoomClient->/users/[userId].get();
zoom:InlineResponse2007 userInfo = check zoomClient->/users/[userId].get();
io:println("User: ", userInfo.displayName, " | Timezone: ", userInfo.timeZone);
scheduler:InlineResponse200 analytics = check zoomClient->/analytics.get(
zoom:InlineResponse200 analytics = check zoomClient->/analytics.get(
userId = userId,
'from = "2025-01-01",
to = "2025-12-31"
);

if analytics.lastNDays is scheduler:InlineResponse200LastNDays {
scheduler:InlineResponse200LastNDays stats = <scheduler:InlineResponse200LastNDays>analytics.lastNDays;
if analytics.lastNDays is zoom:InlineResponse200LastNDays {
zoom:InlineResponse200LastNDays stats = <zoom:InlineResponse200LastNDays>analytics.lastNDays;
io:println("Analytics - Events Created: ", stats.scheduledEventsCreated ?: 0,
" | Completed: ", stats.scheduledEventsCompleted ?: 0,
" | Canceled: ", stats.scheduledEventsCanceled ?: 0);
}

scheduler:InlineResponse2001 availabilityResponse = check zoomClient->/availability.get(
zoom:InlineResponse2001 availabilityResponse = check zoomClient->/availability.get(
userId = userId,
pageSize = 10
);

if availabilityResponse.items is scheduler:InlineResponse2001Items[] {
scheduler:InlineResponse2001Items[] availabilities = <scheduler:InlineResponse2001Items[]>availabilityResponse.items;
if availabilityResponse.items is zoom:InlineResponse2001Items[] {
zoom:InlineResponse2001Items[] availabilities = <zoom:InlineResponse2001Items[]>availabilityResponse.items;
io:println("Availability Schedules: ", availabilities.length());
foreach scheduler:InlineResponse2001Items availability in availabilities {
foreach zoom:InlineResponse2001Items availability in availabilities {
io:println("- ", availability.name, " (", availability.timeZone, "), ID: ", availability.availabilityId);
io:println("Owner: ", availability.owner ?: "Unknown");
}
}

boolean shouldCreateNew = true;
if availabilityResponse.items is scheduler:InlineResponse2001Items[] {
scheduler:InlineResponse2001Items[] availabilities = <scheduler:InlineResponse2001Items[]>availabilityResponse.items;
if availabilityResponse.items is zoom:InlineResponse2001Items[] {
zoom:InlineResponse2001Items[] availabilities = <zoom:InlineResponse2001Items[]>availabilityResponse.items;
int extendedHoursCount = 0;
foreach scheduler:InlineResponse2001Items availability in availabilities {
foreach zoom:InlineResponse2001Items availability in availabilities {
if availability.name == "Extended Office Hours" {
extendedHoursCount += 1;
}
Expand All @@ -77,7 +77,7 @@ public function main() returns error? {
}

if shouldCreateNew {
scheduler:SchedulerAvailabilityBody newAvailability = {
zoom:SchedulerAvailabilityBody newAvailability = {
name: "Extended Office Hours",
timeZone: "America/New_York",
segmentsRecurrence: {
Expand All @@ -103,25 +103,25 @@ public function main() returns error? {
}]
}
};
scheduler:InlineResponse201 createdAvailability = check zoomClient->/availability.post(

zoom:InlineResponse201 createdAvailability = check zoomClient->/availability.post(
payload = newAvailability

);
io:println("Created new availability: ", createdAvailability.name, " (", createdAvailability.availabilityId, ")");
}

scheduler:InlineResponse2005|error allSchedulesResult = zoomClient->/schedules.get(
zoom:InlineResponse2005|error allSchedulesResult = zoomClient->/schedules.get(
userId = userId,
pageSize = 5,
showDeleted = false
);

if allSchedulesResult is scheduler:InlineResponse2005 {
scheduler:InlineResponse2005 allSchedules = allSchedulesResult;
if allSchedules.items is scheduler:InlineResponse2005Items[] {
scheduler:InlineResponse2005Items[] schedules = <scheduler:InlineResponse2005Items[]>allSchedules.items;
if allSchedulesResult is zoom:InlineResponse2005 {
zoom:InlineResponse2005 allSchedules = allSchedulesResult;
if allSchedules.items is zoom:InlineResponse2005Items[] {
zoom:InlineResponse2005Items[] schedules = <zoom:InlineResponse2005Items[]>allSchedules.items;
io:println("Active Schedules: ", schedules.length());
foreach scheduler:InlineResponse2005Items schedule in schedules {
foreach zoom:InlineResponse2005Items schedule in schedules {
io:println("- ", schedule.summary, " (", schedule.duration, "min, ", schedule.capacity, " attendees)");
}
} else {
Expand Down
46 changes: 23 additions & 23 deletions examples/meeting-scheduler/main.bal
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ configurable string clientSecret = ?;
configurable string refreshToken = ?;
configurable string userId = ?;

final scheduler:Client zoomClient = check new ({
final zoom:Client zoomClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -32,14 +32,14 @@ final scheduler:Client zoomClient = check new ({
});

public function main() returns error? {
scheduler:InlineResponse2007 userInfo = check zoomClient->/users/[userId].get();
zoom:InlineResponse2007 userInfo = check zoomClient->/users/[userId].get();
io:println("Meeting Scheduler for ", userInfo.displayName ?: "User");
io:println("Time Zone: ", userInfo.timeZone ?: "UTC");
scheduler:ScheduleravailabilitySegmentsRecurrenceSun weekdaySchedule = [{'start: "09:00", end: "17:00"}];
scheduler:ScheduleravailabilitySegmentsRecurrenceSun weekendSchedule = [{'start: "09:00", end: "12:00"}];
scheduler:SchedulerSchedulesBody newSchedule = {

zoom:ScheduleravailabilitySegmentsRecurrenceSun[] weekdaySchedule = [{'start: "09:00", end: "17:00"}];
zoom:ScheduleravailabilitySegmentsRecurrenceSun[] weekendSchedule = [{'start: "09:00", end: "12:00"}];

zoom:SchedulerSchedulesBody newSchedule = {
addOnType: "zoomMeeting",
availabilityOverride: false,
availabilityRules: [{
Expand Down Expand Up @@ -107,26 +107,26 @@ public function main() returns error? {
active: true
};

scheduler:InlineResponse2011 createdSchedule = check zoomClient->/schedules.post(
zoom:InlineResponse2011 createdSchedule = check zoomClient->/schedules.post(
payload = newSchedule
);

io:println("Created: ", createdSchedule.summary, " (", createdSchedule.scheduleId, ")");

scheduler:InlineResponse2005|error allSchedulesResult = zoomClient->/schedules.get(
zoom:InlineResponse2005|error allSchedulesResult = zoomClient->/schedules.get(
userId = userId,
pageSize = 10,
showDeleted = false
);

if allSchedulesResult is scheduler:InlineResponse2005 {
scheduler:InlineResponse2005 allSchedules = allSchedulesResult;
if allSchedules.items is scheduler:InlineResponse2005Items[] {
scheduler:InlineResponse2005Items[] schedules = <scheduler:InlineResponse2005Items[]>allSchedules.items;
if allSchedulesResult is zoom:InlineResponse2005 {
zoom:InlineResponse2005 allSchedules = allSchedulesResult;
if allSchedules.items is zoom:InlineResponse2005Items[] {
zoom:InlineResponse2005Items[] schedules = <zoom:InlineResponse2005Items[]>allSchedules.items;
io:println("Total Schedules: ", schedules.length());
if schedules.length() > 0 {
foreach int i in 0..<schedules.length() {
scheduler:InlineResponse2005Items schedule = schedules[i];
zoom:InlineResponse2005Items schedule = schedules[i];
io:println("- ", schedule.summary ?: "Unnamed Schedule", " (", schedule.duration ?: 0, "min)");
}
} else {
Expand All @@ -139,21 +139,21 @@ public function main() returns error? {
io:println("Continuing with event fetching...");
}

scheduler:InlineResponse2003|error scheduledEventsResult = zoomClient->/events.get(
zoom:InlineResponse2003|error scheduledEventsResult = zoomClient->/events.get(
userId = userId,
pageSize = 2
);
if scheduledEventsResult is scheduler:InlineResponse2003 {
scheduler:InlineResponse2003 scheduledEvents = scheduledEventsResult;
io:println("Total Events: ", scheduledEvents["totalRecords"] ?: 0);
if scheduledEvents.items is scheduler:InlineResponse2003Items[] {
scheduler:InlineResponse2003Items[] events = <scheduler:InlineResponse2003Items[]>scheduledEvents.items;

if scheduledEventsResult is zoom:InlineResponse2003 {
zoom:InlineResponse2003 scheduledEvents = scheduledEventsResult;
io:println("Total Events: ", scheduledEvents["totalRecords"] ?: 0);
if scheduledEvents.items is zoom:InlineResponse2003Items[] {
zoom:InlineResponse2003Items[] events = <zoom:InlineResponse2003Items[]>scheduledEvents.items;

if events.length() == 0 {
io:println("No scheduled events found yet.");
}
foreach scheduler:InlineResponse2003Items event in events {
foreach zoom:InlineResponse2003Items event in events {
io:println("- Event ", event.eventId ?: "Unknown", " (", event.status ?: "Unknown", ")");
}
}
Expand Down
Loading