Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the package name to googleapis.gcalendar #139

Merged
merged 15 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build-with-bal-test-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
uses: ballerina-platform/ballerina-standard-library/.github/workflows/build-with-bal-test-graalvm-connector-template.yml@main
secrets: inherit
with:
additional-build-flags: "-x :googleapis.calendar-examples:build -Pgroups=mock"
additional-build-flags: "-x :googleapis.gcalendar-examples:build -Pgroups=mock"
Nuvindu marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion .github/workflows/dev-stg-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
secrets: inherit
with:
environment: ${{ github.event.inputs.environment }}
additional-publish-flags: "-x :googleapis.calendar-examples:build -Pgroups=mock"
additional-publish-flags: "-x :googleapis.gcalendar-examples:build -Pgroups=mock"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ jobs:
uses: ballerina-platform/ballerina-standard-library/.github/workflows/release-package-connector-template.yml@main
secrets: inherit
with:
package-name: googleapis.calendar
package-name: googleapis.gcalendar
package-org: ballerinax
2 changes: 1 addition & 1 deletion .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: ballerina-platform/ballerina-standard-library/.github/workflows/trivy-scan-template.yml@main
secrets: inherit
with:
additional-build-flags: "-x :googleapis.calendar-examples:build -Pgroups=mock"
additional-build-flags: "-x :googleapis.gcalendar-examples:build -Pgroups=mock"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#Config file
Config.toml
# Modules
/modules/googleapis.calendar
/modules/googleapis.gcalendar

# BlueJ files
*.ctxt
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[Google Calendar](https://developers.google.com/calendar) is a time-management and scheduling calendar service developed by Google. It lets users to organize their schedule and share events with others.This connector provides the capability to programmatically manage events and calendars.
For more information about configuration and operations, go to the module.

- [googleapis.calendar](calendar/Module.md) - Perform Google Calendar related operations programmatically
- [googleapis.gcalendar](calendar/Module.md) - Perform Google Calendar related operations programmatically

## Overview

Expand Down Expand Up @@ -87,23 +87,23 @@ This sample demonstrates a scenario of creating a secondary calendar and adding

### Step 1: Import the package

Import the `ballerinax/googleapis.calendar` package into your Ballerina project.
Import the `ballerinax/googleapis.gcalendar` package into your Ballerina project.

```ballerina
import ballerinax/googleapis.calendar;
import ballerinax/googleapis.gcalendar;
```

Nuvindu marked this conversation as resolved.
Show resolved Hide resolved
### Step 2: Instantiate a new connector

Create a `calendar:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.
Create a `gcalendar:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.

```ballerina
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string refreshToken = ?;
configurable string refreshUrl = ?;

calendar:Client calendarClient = check new ({
gcalendar:Client calendarClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -119,16 +119,16 @@ You can now utilize the operations available within the connector.

```ballerina
public function main() returns error? {
calendar:Client calendarClient = ...//
gcalendar:Client calendarClient = ...//

// create a calendar
calendar:Calendar calendar = check calendarClient->/calendars.post({
summary: "Work Schedule"
});
// create a calendar
gcalendar:Calendar calendar = check calendarClient->/calendars.post({
summary: "Work Schedule"
});

// quick add new event
string eventTitle = "Sample Event";
calendar:Event event = check calendarClient->/calendars/[calendarId]/events/quickAdd.post(eventTitle);
// quick add new event
string eventTitle = "Sample Event";
gcalendar:Event event = check calendarClient->/calendars/[calendarId]/events/quickAdd.post(eventTitle);
}
```

Expand Down
4 changes: 2 additions & 2 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
distribution = "2201.8.0"
org = "ballerinax"
name = "googleapis.calendar"
export=["googleapis.calendar"]
name = "googleapis.gcalendar"
export=["googleapis.gcalendar"]
version = "4.0.0"
license = ["Apache-2.0"]
authors = ["Ballerina"]
Expand Down
10 changes: 5 additions & 5 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ dependencies = [
[[package]]
org = "ballerina"
name = "constraint"
version = "1.4.0"
version = "1.5.0"
dependencies = [
{org = "ballerina", name = "jballerina.java"}
]

[[package]]
org = "ballerina"
name = "crypto"
version = "2.5.0"
version = "2.6.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "time"}
Expand Down Expand Up @@ -313,7 +313,7 @@ modules = [

[[package]]
org = "ballerinax"
name = "googleapis.calendar"
name = "googleapis.gcalendar"
version = "4.0.0"
dependencies = [
{org = "ballerina", name = "http"},
Expand All @@ -324,7 +324,7 @@ dependencies = [
{org = "ballerinai", name = "observe"}
]
modules = [
{org = "ballerinax", packageName = "googleapis.calendar", moduleName = "googleapis.calendar"},
{org = "ballerinax", packageName = "googleapis.calendar", moduleName = "googleapis.calendar.mock"}
{org = "ballerinax", packageName = "googleapis.gcalendar", moduleName = "googleapis.gcalendar"},
{org = "ballerinax", packageName = "googleapis.gcalendar", moduleName = "googleapis.gcalendar.mock"}
]

14 changes: 7 additions & 7 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ This sample demonstrates a scenario of creating a secondary calendar and adding

### Step 1: Import the package
Nuvindu marked this conversation as resolved.
Show resolved Hide resolved

Import the `ballerinax/googleapis.calendar` package into your Ballerina project.
Import the `ballerinax/googleapis.gcalendar` package into your Ballerina project.

```ballerina
import ballerinax/googleapis.calendar;
import ballerinax/googleapis.gcalendar;
```

### Step 2: Instantiate a new connector

Create a `calendar:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.
Create a `gcalendar:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.

```ballerina
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string refreshToken = ?;
configurable string refreshUrl = ?;

calendar:Client calendarClient = check new ({
gcalendar:Client calendarClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -106,16 +106,16 @@ You can now utilize the operations available within the connector.

```ballerina
public function main() returns error? {
calendar:Client calendarClient = ...//
gcalendar:Client calendarClient = ...//

// create a calendar
calendar:Calendar calendar = check calendarClient->/calendars.post({
gcalendar:Calendar calendar = check calendarClient->/calendars.post({
summary: "Work Schedule"
});

// quick add new event
string eventTitle = "Sample Event";
calendar:Event event = check calendarClient->/calendars/[calendarId]/events/quickAdd.post(eventTitle);
gcalendar:Event event = check calendarClient->/calendars/[calendarId]/events/quickAdd.post(eventTitle);
}
```

Expand Down
14 changes: 7 additions & 7 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ This sample demonstrates a scenario of creating a secondary calendar and adding

### Step 1: Import the package

Import the `ballerinax/googleapis.calendar` package into your Ballerina project.
Import the `ballerinax/googleapis.gcalendar` package into your Ballerina project.

```ballerina
import ballerinax/googleapis.calendar;
import ballerinax/googleapis.gcalendar;
```

### Step 2: Instantiate a new connector

Create a `calendar:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.
Create a `gcalendar:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.

```ballerina
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string refreshToken = ?;
configurable string refreshUrl = ?;

calendar:Client calendarClient = check new ({
gcalendar:Client calendarClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -106,16 +106,16 @@ You can now utilize the operations available within the connector.

```ballerina
public function main() returns error? {
calendar:Client calendarClient = ...//
gcalendar:Client calendarClient = ...//

// create a calendar
calendar:Calendar calendar = check calendarClient->/calendars.post({
gcalendar:Calendar calendar = check calendarClient->/calendars.post({
summary: "Work Schedule"
});

// quick add new event
string eventTitle = "Sample Event";
calendar:Event event = check calendarClient->/calendars/[calendarId]/events/quickAdd.post(eventTitle);
gcalendar:Event event = check calendarClient->/calendars/[calendarId]/events/quickAdd.post(eventTitle);
}
```

Expand Down
2 changes: 1 addition & 1 deletion ballerina/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {

description = 'Calendar - Ballerina'

def packageName = "googleapis.calendar"
def packageName = "googleapis.gcalendar"
def packageOrg = "ballerinax"
def tomlVersion = stripBallerinaExtensionVersion("${project.version}")
def ballerinaTomlFilePlaceHolder = new File("${project.rootDir}/build-config/resources/Ballerina.toml")
Expand Down
Loading
Loading