Skip to content

Commit

Permalink
Update .md files
Browse files Browse the repository at this point in the history
  • Loading branch information
linukaratnayake committed Jan 9, 2025
1 parent 5759b65 commit 8a8e1ca
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 46 deletions.
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,24 @@ import ballerinax/hubspot.crm.engagement.notes as hsengnotes;
clientId = "<Client Id>"
clientSecret = "<Client Secret>"
refreshToken = "<Refresh Token>"
```

```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

Expand All @@ -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:
Expand Down
38 changes: 22 additions & 16 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -130,22 +130,22 @@ import ballerinax/hubspot.crm.engagement.notes as engagementNotes;
refreshToken = "<Refresh Token>"
```

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

Expand All @@ -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:
Expand Down
38 changes: 22 additions & 16 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -131,22 +131,22 @@ import ballerinax/hubspot.crm.engagement.notes as engagementNotes;
refreshToken = "<Refresh Token>"
```

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

Expand All @@ -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:
Expand Down

0 comments on commit 8a8e1ca

Please sign in to comment.