Skip to content

Commit

Permalink
Update the readme.md with new package name
Browse files Browse the repository at this point in the history
  • Loading branch information
DimuthuMadushan committed Mar 6, 2024
1 parent defe811 commit 3dbed6c
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 999 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,23 @@ To use the `Google Sheets` connector in your Ballerina project, modify the `.bal

### Step 1: Import connector

Import the `ballerinax/googleapis.sheets` module.
Import the `ballerinax/googleapis.gsheets` module.

```ballerina
import ballerinax/googleapis.sheets as sheets;
import ballerinax/googleapis.gsheets;
```

### Step 2: Create a new connector instance

Create a `sheets:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.
Create a `gsheets: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 = ?;
sheets:Client spreadsheetClient = check new ({
gsheets:Client spreadsheetClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -120,11 +120,11 @@ Now, utilize the available connector operations.
public function main() returns error? {
// create a spreadsheet
sheets:Spreadsheet response = check spreadsheetClient->createSpreadsheet("NewSpreadsheet");
gsheets:Spreadsheet response = check spreadsheetClient->createSpreadsheet("NewSpreadsheet");
// Add a new worksheet with given name to the Spreadsheet
string spreadsheetId = response.spreadsheetId;
sheets:Sheet sheet = check spreadsheetClient->addSheet(spreadsheetId, "NewWorksheet");
gsheets:Sheet sheet = check spreadsheetClient->addSheet(spreadsheetId, "NewWorksheet");
}
```

Expand Down Expand Up @@ -225,7 +225,7 @@ All the contributors are encouraged to read the [Ballerina Code of Conduct](http

## Useful links

* For more information go to the [`googleapis.sheets` package](https://lib.ballerina.io/ballerinax/googleapis.sheets/latest).
* For more information go to the [`googleapis.gsheets` package](https://lib.ballerina.io/ballerinax/googleapis.gsheets/latest).
* For example, demonstrations of the usage, go to [Ballerina By Examples](https://ballerina.io/learn/by-example/).
* Chat live with us via our [Discord server](https://discord.gg/ballerinalang).
* Post all technical questions on Stack Overflow with the [#ballerina](https://stackoverflow.com/questions/tagged/ballerina) tag.
2 changes: 1 addition & 1 deletion ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "http"
version = "2.10.7"
version = "2.10.8"
dependencies = [
{org = "ballerina", name = "auth"},
{org = "ballerina", name = "cache"},
Expand Down
10 changes: 5 additions & 5 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ To use the Google Sheets connector in your Ballerina project, modify the `.bal`
Import the `ballerinax/googleapis.gsheets` module.

```ballerina
import ballerinax/googleapis.gsheets as sheets;
import ballerinax/googleapis.gsheets;
```

### Step 2: Create a new connector instance

Create a `sheets:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.
Create a `gsheets: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 = ?;
sheets:Client spreadsheetClient = check new ({
gsheets:Client spreadsheetClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -114,11 +114,11 @@ Now, utilize the available connector operations.
public function main() returns error? {
// create a spreadsheet
sheets:Spreadsheet response = check spreadsheetClient->createSpreadsheet("NewSpreadsheet");
gsheets:Spreadsheet response = check spreadsheetClient->createSpreadsheet("NewSpreadsheet");
// Add a new worksheet with given name to the Spreadsheet
string spreadsheetId = response.spreadsheetId;
sheets:Sheet sheet = check spreadsheetClient->addSheet(spreadsheetId, "NewWorksheet");
gsheets:Sheet sheet = check spreadsheetClient->addSheet(spreadsheetId, "NewWorksheet");
}
```

Expand Down
10 changes: 5 additions & 5 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,20 @@ To use the Google Sheets connector in your Ballerina project, modify the `.bal`
Import the `ballerinax/googleapis.gsheets` module.

```ballerina
import ballerinax/googleapis.gsheets as sheets;
import ballerinax/googleapis.gsheets;
```

### Step 2: Create a new connector instance

Create a `sheets:ConnectionConfig` with the obtained OAuth2.0 tokens and initialize the connector with it.
Create a `gsheets: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 = ?;
sheets:Client spreadsheetClient = check new ({
gsheets:Client spreadsheetClient = check new ({
auth: {
clientId,
clientSecret,
Expand All @@ -114,11 +114,11 @@ Now, utilize the available connector operations.
public function main() returns error? {
// create a spreadsheet
sheets:Spreadsheet response = check spreadsheetClient->createSpreadsheet("NewSpreadsheet");
gsheets:Spreadsheet response = check spreadsheetClient->createSpreadsheet("NewSpreadsheet");
// Add a new worksheet with given name to the Spreadsheet
string spreadsheetId = response.spreadsheetId;
sheets:Sheet sheet = check spreadsheetClient->addSheet(spreadsheetId, "NewWorksheet");
gsheets:Sheet sheet = check spreadsheetClient->addSheet(spreadsheetId, "NewWorksheet");
}
```

Expand Down
Loading

0 comments on commit 3dbed6c

Please sign in to comment.