From 01400b3f77f2fdd1341af5eea2f97890d026ad35 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Thu, 4 Jan 2024 23:52:47 +0530 Subject: [PATCH 1/3] Add symlinks for example readme files --- examples/project-management-with-calendar/.github/README.md | 1 + .../work-schedule-management-with-calendar/.github/README.md | 1 + 2 files changed, 2 insertions(+) create mode 120000 examples/project-management-with-calendar/.github/README.md create mode 120000 examples/work-schedule-management-with-calendar/.github/README.md diff --git a/examples/project-management-with-calendar/.github/README.md b/examples/project-management-with-calendar/.github/README.md new file mode 120000 index 0000000..8e9aae8 --- /dev/null +++ b/examples/project-management-with-calendar/.github/README.md @@ -0,0 +1 @@ +../project-management-with-calendar.md \ No newline at end of file diff --git a/examples/work-schedule-management-with-calendar/.github/README.md b/examples/work-schedule-management-with-calendar/.github/README.md new file mode 120000 index 0000000..e5b1a05 --- /dev/null +++ b/examples/work-schedule-management-with-calendar/.github/README.md @@ -0,0 +1 @@ +../work-schedule-management-with-calendar.md \ No newline at end of file From 6b2ecc4427f25761db51295f007977c1a10bd8c0 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Fri, 5 Jan 2024 00:09:53 +0530 Subject: [PATCH 2/3] Update documentations for examples --- README.md | 6 ++--- ballerina/Module.md | 4 ++-- ballerina/Package.md | 4 ++-- examples/README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 examples/README.md diff --git a/README.md b/README.md index 5444085..a0d5d8c 100644 --- a/README.md +++ b/README.md @@ -136,10 +136,10 @@ public function main() returns error? { The Google calendar connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples), covering use cases like creating calendar, scheduling meeting events, and adding reminders. -1. [Project Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/project-management-with-calendar/main.bal) +1. [Project Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/project-management-with-calendar) This example shows how to use Google calendar APIs to efficiently manage work schedule of a person. It interacts with the API for various tasks related to scheduling and organizing work-related events and meetings. -2. [Work Schedule Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/work-schedule-management-with-calendar/main.bal) - This example shows how to use Google calendar APIs to manage personal project schedule and collaborate with team members. +2. [Work Schedule Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/work-schedule-management-with-calendar) + This example shows how to use Google calendar APIs to managing personal project schedule and collaborating with team members. For comprehensive information about the connector's functionality, configuration, and usage in Ballerina programs, refer to the Google Calendar connector's reference guide in [Ballerina Central](https://central.ballerina.io/ballerinax/googleapis.calendar/latest). diff --git a/ballerina/Module.md b/ballerina/Module.md index 49ad021..01588a6 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -123,9 +123,9 @@ public function main() returns error? { The Google Calendar connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples), covering use cases like creating calendar, scheduling meeting events, and adding reminders. -1. [Project Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/project-management-with-calendar/main.bal) +1. [Project Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/project-management-with-calendar) This example shows how to use Google calendar APIs to efficiently manage work schedule of a person. It interacts with the API for various tasks related to scheduling and organizing work-related events and meetings. -2. [Work Schedule Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/work-schedule-management-with-calendar/main.bal) +2. [Work Schedule Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/work-schedule-management-with-calendar) This example shows how to use Google calendar APIs to managing personal project schedule and collaborating with team members. For comprehensive information about the connector's functionality, configuration, and usage in Ballerina programs, refer to the Google Calendar connector's reference guide in [Ballerina Central](https://central.ballerina.io/ballerinax/googleapis.calendar/latest). diff --git a/ballerina/Package.md b/ballerina/Package.md index d3a3fba..90b43ef 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -123,9 +123,9 @@ public function main() returns error? { The Google Calendar connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples), covering use cases like creating calendar, scheduling meeting events, and adding reminders. -1. [Project Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/project-management-with-calendar/main.bal) +1. [Project Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/project-management-with-calendar) This example shows how to use Google calendar APIs to efficiently manage work schedule of a person. It interacts with the API for various tasks related to scheduling and organizing work-related events and meetings. -2. [Work Schedule Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/work-schedule-management-with-calendar/main.bal) +2. [Work Schedule Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/work-schedule-management-with-calendar) This example shows how to use Google calendar APIs to managing personal project schedule and collaborating with team members. For comprehensive information about the connector's functionality, configuration, and usage in Ballerina programs, refer to the Google Calendar connector's reference guide in [Ballerina Central](https://central.ballerina.io/ballerinax/googleapis.calendar/latest). diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..4080680 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,55 @@ +# Examples + +The Google calendar connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples), covering use cases like creating calendar, scheduling meeting events, and adding reminders. + +1. [Project Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/project-management-with-calendar) + This example shows how to use Google calendar APIs to efficiently manage work schedule of a person. It interacts with the API for various tasks related to scheduling and organizing work-related events and meetings. +2. [Work Schedule Management With Calendar API](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar/tree/main/examples/work-schedule-management-with-calendar) + This example shows how to use Google calendar APIs to managing personal project schedule and collaborating with team members. + +## Prerequisites + +1. Follow the [instructions](https://github.com/ballerina-platform/module-ballerinax-googleapis.calendar#set-up-guide) to set up the Calendar API. + +2. For each example, create a `Config.toml` file with your OAuth2 tokens, client ID, and client secret. Here's an example of how your `Config.toml` file should look: + + ```toml + clientId="" + clientSecret="" + refreshToken="" + refreshUrl="" + ``` + +## Running an Example + +Execute the following commands to build an example from the source: + +* To build an example: + + ```bash + bal build + ``` + +* To run an example: + + ```bash + bal run + ``` + +## Building the Examples with the Local Module + +**Warning**: Due to the absence of support for reading local repositories for single Ballerina files, the Bala of the module is manually written to the central repository as a workaround. Consequently, the bash script may modify your local Ballerina repositories. + +Execute the following commands to build all the examples against the changes you have made to the module locally: + +* To build all the examples: + + ```bash + ./build.sh build + ``` + +* To run all the examples: + + ```bash + ./build.sh run + ``` From c264dfdbc2f0bc290b8d23a5ee37ab7dd92be6d3 Mon Sep 17 00:00:00 2001 From: Nuvindu Date: Fri, 5 Jan 2024 08:02:49 +0530 Subject: [PATCH 3/3] Fix the description of module error type --- ballerina/error.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/error.bal b/ballerina/error.bal index 808928f..4194c01 100644 --- a/ballerina/error.bal +++ b/ballerina/error.bal @@ -14,5 +14,5 @@ // specific language governing permissions and limitations // under the License. -# Represents any error related to the wssec module. +# Represents any error related to the `gcalendar` module. public type Error distinct error;