From 04868e1423379a36e2c6691de72cef8f1b685ccd Mon Sep 17 00:00:00 2001 From: Nipuna Fernando Date: Sun, 13 Aug 2023 20:14:19 +0530 Subject: [PATCH] Fix outdated examples --- examples/list_groups.bal | 4 ++-- examples/list_members_of_group.bal | 4 ++-- examples/list_owners_of_group.bal | 4 ++-- examples/list_parent_groups.bal | 4 ++-- examples/list_permission_grants.bal | 4 ++-- examples/list_transitive_members.bal | 4 ++-- examples/list_transitive_parent_groups.bal | 4 ++-- examples/list_users.bal | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/examples/list_groups.bal b/examples/list_groups.bal index 40aca51..d15817e 100644 --- a/examples/list_groups.bal +++ b/examples/list_groups.bal @@ -35,8 +35,8 @@ public function main() returns error? { log:printInfo("List groups"); - stream|error groupStream = aadClient->listGroups(); - if (groupStream is stream) { + stream|error groupStream = aadClient->listGroups(); + if (groupStream is stream) { error? e = groupStream.forEach(isolated function(ad:Group item) { log:printInfo(item.toString()); }); diff --git a/examples/list_members_of_group.bal b/examples/list_members_of_group.bal index 50a0732..0aa345a 100644 --- a/examples/list_members_of_group.bal +++ b/examples/list_members_of_group.bal @@ -36,8 +36,8 @@ public function main() returns error? { log:printInfo("List members in a group"); string groupId = ""; - stream|error groupStream = aadClient->listGroupMembers(groupId); - if (groupStream is stream) { + stream|error groupStream = aadClient->listGroupMembers(groupId); + if (groupStream is stream) { error? e = groupStream.forEach(isolated function(ad:User item) { log:printInfo(item.toString()); }); diff --git a/examples/list_owners_of_group.bal b/examples/list_owners_of_group.bal index 51571cd..de34e27 100644 --- a/examples/list_owners_of_group.bal +++ b/examples/list_owners_of_group.bal @@ -36,8 +36,8 @@ public function main() returns error? { log:printInfo("List owners in a group"); string groupId = ""; - stream|error groupStream = aadClient->listGroupOwners(groupId); - if (groupStream is stream) { + stream|error groupStream = aadClient->listGroupOwners(groupId); + if (groupStream is stream) { error? e = groupStream.forEach(isolated function(ad:User item) { log:printInfo(item.toString()); }); diff --git a/examples/list_parent_groups.bal b/examples/list_parent_groups.bal index ae315fd..aaa7faa 100644 --- a/examples/list_parent_groups.bal +++ b/examples/list_parent_groups.bal @@ -36,8 +36,8 @@ public function main() returns error? { log:printInfo("List parent groups"); string groupId = ""; - stream|error groupStream = aadClient->listParentGroups("group", groupId); - if (groupStream is stream) { + stream|error groupStream = aadClient->listParentGroups("group", groupId); + if (groupStream is stream) { error? e = groupStream.forEach(isolated function(ad:Group item) { log:printInfo(item.toString()); }); diff --git a/examples/list_permission_grants.bal b/examples/list_permission_grants.bal index ea2da09..f9541b6 100644 --- a/examples/list_permission_grants.bal +++ b/examples/list_permission_grants.bal @@ -36,8 +36,8 @@ public function main() returns error? { log:printInfo("List permission grants"); string groupId = ""; - stream|error grantStream = aadClient->listPermissionGrants(groupId); - if (grantStream is stream) { + stream|error grantStream = aadClient->listPermissionGrants(groupId); + if (grantStream is stream) { error? e = grantStream.forEach(isolated function(ad:PermissionGrant item) { log:printInfo(item.toString()); }); diff --git a/examples/list_transitive_members.bal b/examples/list_transitive_members.bal index 207b03a..218c6e0 100644 --- a/examples/list_transitive_members.bal +++ b/examples/list_transitive_members.bal @@ -36,8 +36,8 @@ public function main() returns error? { log:printInfo("List transitive members in a group"); string groupId = ""; - stream|error groupStream = aadClient->listTransitiveGroupMembers(groupId); - if (groupStream is stream) { + stream|error groupStream = aadClient->listTransitiveGroupMembers(groupId); + if (groupStream is stream) { error? e = groupStream.forEach(isolated function(ad:User item) { log:printInfo(item.toString()); }); diff --git a/examples/list_transitive_parent_groups.bal b/examples/list_transitive_parent_groups.bal index cbf34f2..a7126bd 100644 --- a/examples/list_transitive_parent_groups.bal +++ b/examples/list_transitive_parent_groups.bal @@ -36,8 +36,8 @@ public function main() returns error? { log:printInfo("List transitive parent groups"); string groupId = ""; - stream|error groupStream = aadClient->listTransitiveParentGroups("group", groupId); - if (groupStream is stream) { + stream|error groupStream = aadClient->listTransitiveParentGroups("group", groupId); + if (groupStream is stream) { error? e = groupStream.forEach(isolated function(ad:Group item) { log:printInfo(item.toString()); }); diff --git a/examples/list_users.bal b/examples/list_users.bal index 2f1d8b5..d9515fe 100644 --- a/examples/list_users.bal +++ b/examples/list_users.bal @@ -35,8 +35,8 @@ public function main() returns error? { log:printInfo("List users"); - stream|error userStream = aadClient->listUsers(); - if (userStream is stream) { + stream|error userStream = aadClient->listUsers(); + if (userStream is stream) { error? e = userStream.forEach(isolated function(ad:User item) { log:printInfo(item.toString()); });