From 8a8e1ca30882bfdeb28fd7f51ccbfb5c563ac641 Mon Sep 17 00:00:00 2001 From: Linuka Ratnayake <79963204+linukaratnayake@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:10:19 +0530 Subject: [PATCH] Update .md files --- README.md | 37 +++++++++++++++++++++++-------------- ballerina/Module.md | 38 ++++++++++++++++++++++---------------- ballerina/Package.md | 38 ++++++++++++++++++++++---------------- 3 files changed, 67 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index b145a52..b03f31a 100644 --- a/README.md +++ b/README.md @@ -136,21 +136,24 @@ import ballerinax/hubspot.crm.engagement.notes as hsengnotes; clientId = "" clientSecret = "" refreshToken = "" + ``` - ```ballerina - configurable string clientId = ?; - configurable string clientSecret = ?; - configurable string refreshToken = ?; +2. Instantiate `hsengnotes:OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. - hsengnotes:OAuth2RefreshTokenGrantConfig auth = { - clientId, - clientSecret, - refreshToken, - credentialBearer: oauth2:POST_BODY_BEARER - }; + ```ballerina + configurable string clientId = ?; + configurable string clientSecret = ?; + configurable string refreshToken = ?; - final hsengnotes:Client hubSpotNotes = check new ({ auth }); - ``` + hsengnotes:OAuth2RefreshTokenGrantConfig auth = { + clientId, + clientSecret, + refreshToken, + credentialBearer: oauth2:POST_BODY_BEARER + }; + + final hsengnotes:Client hubSpotNotes = check new ({ auth }); + ``` ### Step 3: Invoke the connector operation @@ -160,11 +163,17 @@ Now, utilize the available connector operations. A sample use case is shown belo ```ballerina public function main() returns error? { -string noteId = ""; // ID of the note that needs to be read -hsengnotes:SimplePublicObjectWithAssociations readResponse = check hubSpotNotes->/[noteId](); + string noteId = ""; // ID of the note that needs to be read + hsengnotes:SimplePublicObjectWithAssociations readResponse = check hubSpotNotes->/[noteId](); } ``` +### Step 4: Run the Ballerina application + +```bash +bal run +``` + ## Examples The `Ballerina HubSpot CRM Engagement Notes Connector` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-hubspot.crm.engagement.notes/tree/main/examples/), covering the following use cases: diff --git a/ballerina/Module.md b/ballerina/Module.md index 06f9163..6a41cfb 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -117,7 +117,7 @@ Import the `hubspot.crm.engagement.notes` module and `oauth2` module. ```ballerina import ballerina/oauth2; -import ballerinax/hubspot.crm.engagement.notes as engagementNotes; +import ballerinax/hubspot.crm.engagement.notes as hsengnotes; ``` ### Step 2: Instantiate a new connector @@ -130,22 +130,22 @@ import ballerinax/hubspot.crm.engagement.notes as engagementNotes; refreshToken = "" ``` -2. Instantiate `engagementNotes:OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. +2. Instantiate `hsengnotes:OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. - ```ballerina - configurable string clientId = ?; - configurable string clientSecret = ?; - configurable string refreshToken = ?; + ```ballerina + configurable string clientId = ?; + configurable string clientSecret = ?; + configurable string refreshToken = ?; - engagementNotes:OAuth2RefreshTokenGrantConfig auth = { - clientId, - clientSecret, - refreshToken, - credentialBearer: oauth2:POST_BODY_BEARER - }; + hsengnotes:OAuth2RefreshTokenGrantConfig auth = { + clientId, + clientSecret, + refreshToken, + credentialBearer: oauth2:POST_BODY_BEARER + }; - final engagementNotes:Client hubSpotNotes = check new ({auth}); - ``` + final hsengnotes:Client hubSpotNotes = check new ({ auth }); + ``` ### Step 3: Invoke the connector operation @@ -155,11 +155,17 @@ Now, utilize the available connector operations. A sample use case is shown belo ```ballerina public function main() returns error? { -string noteId = ""; // ID of the note that needs to be read -engagementNotes:SimplePublicObjectWithAssociations readResponse = check hubSpotNotes->/[noteId](); + string noteId = ""; // ID of the note that needs to be read + hsengnotes:SimplePublicObjectWithAssociations readResponse = check hubSpotNotes->/[noteId](); } ``` +### Step 4: Run the Ballerina application + +```bash +bal run +``` + ## Examples The `Ballerina HubSpot CRM Engagement Notes Connector` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-hubspot.crm.engagement.notes/tree/main/examples/), covering the following use cases: diff --git a/ballerina/Package.md b/ballerina/Package.md index 2711b2b..f3e46e9 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -118,7 +118,7 @@ Import the `hubspot.crm.engagement.notes` module and `oauth2` module. ```ballerina import ballerina/oauth2; -import ballerinax/hubspot.crm.engagement.notes as engagementNotes; +import ballerinax/hubspot.crm.engagement.notes as hsengnotes; ``` ### Step 2: Instantiate a new connector @@ -131,22 +131,22 @@ import ballerinax/hubspot.crm.engagement.notes as engagementNotes; refreshToken = "" ``` -2. Instantiate `engagementNotes:OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. +2. Instantiate `hsengnotes:OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. - ```ballerina - configurable string clientId = ?; - configurable string clientSecret = ?; - configurable string refreshToken = ?; + ```ballerina + configurable string clientId = ?; + configurable string clientSecret = ?; + configurable string refreshToken = ?; - engagementNotes:OAuth2RefreshTokenGrantConfig auth = { - clientId, - clientSecret, - refreshToken, - credentialBearer: oauth2:POST_BODY_BEARER - }; + hsengnotes:OAuth2RefreshTokenGrantConfig auth = { + clientId, + clientSecret, + refreshToken, + credentialBearer: oauth2:POST_BODY_BEARER + }; - final engagementNotes:Client hubSpotNotes = check new ({auth}); - ``` + final hsengnotes:Client hubSpotNotes = check new ({ auth }); + ``` ### Step 3: Invoke the connector operation @@ -156,11 +156,17 @@ Now, utilize the available connector operations. A sample use case is shown belo ```ballerina public function main() returns error? { -string noteId = ""; // ID of the note that needs to be read -engagementNotes:SimplePublicObjectWithAssociations readResponse = check hubSpotNotes->/[noteId](); + string noteId = ""; // ID of the note that needs to be read + hsengnotes:SimplePublicObjectWithAssociations readResponse = check hubSpotNotes->/[noteId](); } ``` +### Step 4: Run the Ballerina application + +```bash +bal run +``` + ## Examples The `Ballerina HubSpot CRM Engagement Notes Connector` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/module-ballerinax-hubspot.crm.engagement.notes/tree/main/examples/), covering the following use cases: