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

Fix documentation issues #11

Merged
merged 1 commit into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
26 changes: 14 additions & 12 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overview

[HubSpot](https://www.hubspot.com/our-story) is an AI-powered customer relationship management (CRM) platform.
[HubSpot](https://www.hubspot.com/our-story) is an AI-powered customer relationship management (CRM) platform.

The `ballerinax/hubspot.crm.imports` offers APIs to connect and interact with the [HubSpot CRM Imports API](https://developers.hubspot.com/docs/api/crm/imports) endpoints, specifically based on the [HubSpot CRM Imports REST API](https://developers.hubspot.com/docs/reference/api/crm/imports)

Expand All @@ -14,9 +14,9 @@ If you have an account already, go to the [HubSpot developer portal](https://app

If you don't have a HubSpot Developer Account you can sign up to a free account [here](https://developers.hubspot.com/get-started)

### Step 2 (Optional): Create a [Developer Test Account](https://developers.hubspot.com/beta-docs/getting-started/account-types#developer-test-accounts) under your account
### Step 2 (Optional): Create a Developer Test Account

Within app developer accounts, you can create developer test accounts to test apps and integrations without affecting any real HubSpot data.
Within app developer accounts, you can create a [developer test account](https://developers.hubspot.com/beta-docs/getting-started/account-types#developer-test-accounts) under your account to test apps and integrations without affecting any real HubSpot data.

> **Note:**These accounts are only for development and testing purposes. In production you should not use Developer Test Accounts.

Expand All @@ -32,27 +32,27 @@ Within app developer accounts, you can create developer test accounts to test ap

![Create Hubspot developer test account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/test_acc_3.png)

### Step 3: Create a HubSpot App under your account.
### Step 3: Create a HubSpot App under your account

1. In your developer account, navigate to the "Apps" section. Click on "Create App"

![Hubspot apps](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/create_app_1.png)

2. Provide the necessary details, including the app name and description.

### Step 4: Configure the Authentication Flow.
### Step 4: Configure the Authentication Flow

1. Move to the "Auth" Tab.

![Hubspot app auth tab](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/create_app_2.png)

2. In the Scopes section, add the following scopes for your app using the "Add new scope" button.

`crm.objects.import`
- `crm.objects.import`

![Add new scope](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/scope_set.png)

4. Add your Redirect URI in the relevant section. You can also use localhost addresses for local development purposes. Click Create App.
3. Add your Redirect URI in the relevant section. You can also use localhost addresses for local development purposes. Click Create App.

![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/create_app_final.png)

Expand All @@ -72,15 +72,15 @@ Before proceeding with the Quickstart, ensure you have obtained the Access Token
https://app.hubspot.com/oauth/authorize?client_id=<YOUR_CLIENT_ID>&scope=<YOUR_SCOPES>&redirect_uri=<YOUR_REDIRECT_URI>
```

Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI>` and `<YOUR_SCOPES>` with your specific value.
Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI>`, and `<YOUR_SCOPES>` with your specific value.

2. Paste it in the browser and select your developer test account to install the app when prompted.

![Choose account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/install_app.png)

3. A code will be displayed in the browser. Copy the code.

4. Run the following curl command. Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI`> and `<YOUR_CLIENT_SECRET>` with your specific value. Use the code you received in the above step 3 as the `<CODE>`.
4. Run the following curl command. Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI>`, and `<YOUR_CLIENT_SECRET>` with your specific value. Use the code you received in the above step 3 as the `<CODE>`.

- Linux/macOS

Expand Down Expand Up @@ -138,7 +138,7 @@ import ballerinax/hubspot.crm.'import as crmImport;

2. Instantiate a `crmImport:ConnectionConfig` with the obtained credentials and initialize the connector with it.

```ballerina
```ballerina
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string refreshToken = ?;
Expand All @@ -157,10 +157,10 @@ import ballerinax/hubspot.crm.'import as crmImport;

### Step 3: Invoke the connector operation

Now, utilize the available connector operations. A sample usecase is shown below.
Now, utilize the available connector operations. A sample use case is shown below.

#### Get a paged list of active imports

```ballerina
public function main() returns error? {
crmImport:CollectionResponsePublicImportResponse response = check baseClient->/.get({});
Expand All @@ -170,3 +170,5 @@ public function main() returns error? {
## Examples

The `HubSpot.crm.imports` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/examples), covering the following use cases:

1. [Creating a contact import](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.import/tree/main/examples/handle-import) - Integrate `hubspot.crm.import` API to create and manage a contact data import
26 changes: 14 additions & 12 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Overview

[HubSpot](https://www.hubspot.com/our-story) is an AI-powered customer relationship management (CRM) platform.
[HubSpot](https://www.hubspot.com/our-story) is an AI-powered customer relationship management (CRM) platform.

The `ballerinax/hubspot.crm.imports` offers APIs to connect and interact with the [HubSpot CRM Imports API](https://developers.hubspot.com/docs/api/crm/imports) endpoints, specifically based on the [HubSpot CRM Imports REST API](https://developers.hubspot.com/docs/reference/api/crm/imports)

Expand All @@ -14,9 +14,9 @@ If you have an account already, go to the [HubSpot developer portal](https://app

If you don't have a HubSpot Developer Account you can sign up to a free account [here](https://developers.hubspot.com/get-started)

### Step 2 (Optional): Create a [Developer Test Account](https://developers.hubspot.com/beta-docs/getting-started/account-types#developer-test-accounts) under your account
### Step 2 (Optional): Create a Developer Test Account

Within app developer accounts, you can create developer test accounts to test apps and integrations without affecting any real HubSpot data.
Within app developer accounts, you can create a [developer test account](https://developers.hubspot.com/beta-docs/getting-started/account-types#developer-test-accounts) under your account to test apps and integrations without affecting any real HubSpot data.

> **Note:**These accounts are only for development and testing purposes. In production you should not use Developer Test Accounts.

Expand All @@ -32,27 +32,27 @@ Within app developer accounts, you can create developer test accounts to test ap

![Create Hubspot developer test account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/test_acc_3.png)

### Step 3: Create a HubSpot App under your account.
### Step 3: Create a HubSpot App under your account

1. In your developer account, navigate to the "Apps" section. Click on "Create App"

![Hubspot apps](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/create_app_1.png)

2. Provide the necessary details, including the app name and description.

### Step 4: Configure the Authentication Flow.
### Step 4: Configure the Authentication Flow

1. Move to the "Auth" Tab.

![Hubspot app auth tab](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/create_app_2.png)

2. In the Scopes section, add the following scopes for your app using the "Add new scope" button.

`crm.objects.import`
- `crm.objects.import`

![Add new scope](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/scope_set.png)

4. Add your Redirect URI in the relevant section. You can also use localhost addresses for local development purposes. Click Create App.
3. Add your Redirect URI in the relevant section. You can also use localhost addresses for local development purposes. Click Create App.

![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/create_app_final.png)

Expand All @@ -72,15 +72,15 @@ Before proceeding with the Quickstart, ensure you have obtained the Access Token
https://app.hubspot.com/oauth/authorize?client_id=<YOUR_CLIENT_ID>&scope=<YOUR_SCOPES>&redirect_uri=<YOUR_REDIRECT_URI>
```

Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI>` and `<YOUR_SCOPES>` with your specific value.
Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI>`, and `<YOUR_SCOPES>` with your specific value.

2. Paste it in the browser and select your developer test account to install the app when prompted.

![Choose account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/docs/setup/resources/install_app.png)

3. A code will be displayed in the browser. Copy the code.

4. Run the following curl command. Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI`> and `<YOUR_CLIENT_SECRET>` with your specific value. Use the code you received in the above step 3 as the `<CODE>`.
4. Run the following curl command. Replace the `<YOUR_CLIENT_ID>`, `<YOUR_REDIRECT_URI>`, and `<YOUR_CLIENT_SECRET>` with your specific value. Use the code you received in the above step 3 as the `<CODE>`.

- Linux/macOS

Expand Down Expand Up @@ -138,7 +138,7 @@ import ballerinax/hubspot.crm.'import as crmImport;

2. Instantiate a `crmImport:ConnectionConfig` with the obtained credentials and initialize the connector with it.

```ballerina
```ballerina
configurable string clientId = ?;
configurable string clientSecret = ?;
configurable string refreshToken = ?;
Expand All @@ -157,10 +157,10 @@ import ballerinax/hubspot.crm.'import as crmImport;

### Step 3: Invoke the connector operation

Now, utilize the available connector operations. A sample usecase is shown below.
Now, utilize the available connector operations. A sample use case is shown below.

#### Get a paged list of active imports

```ballerina
public function main() returns error? {
crmImport:CollectionResponsePublicImportResponse response = check baseClient->/.get({});
Expand All @@ -170,3 +170,5 @@ public function main() returns error? {
## Examples

The `HubSpot.crm.imports` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.import/main/examples), covering the following use cases:

1. [Creating a contact import](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.import/tree/main/examples/handle-import) - Integrate `hubspot.crm.import` API to create and manage a contact data import
1 change: 0 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ The `hubspot.crm.import` connector provides practical examples illustrating usag

1. [Creating a contact import](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.import/tree/main/examples/handle-import) - Integrate hubspot.crm.import API to create and manage a contact data import


## Prerequisites

1. Generate Credentials to authenticate the connector as described in the [Setup Guide](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.import/tree/main/README.md).
Expand Down
4 changes: 2 additions & 2 deletions examples/handle-import/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This use case demonstrates how the HubSpot CRM Imports connector can be utilized

## Prerequisites

### 1. Setup Hubspot developer account
### 1. Setup HubSpot developer account

Refer to the [Setup guide](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.import/tree/main/README.md) to obtain necessary credentials (client Id, client secret, tokens).

Expand All @@ -22,6 +22,6 @@ refreshToken = "<Refresh Token>"

Execute the following command to run the example:

```
```shell
bal run
```
Loading