diff --git a/README.md b/README.md index 057773a..67084fe 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Overview -[HubSpot ](https://www.hubspot.com/) is an AI-powered customer relationship management (CRM) platform. +[HubSpot ](https://www.hubspot.com/) is an AI-powered customer relationship management (CRM) platform. The `ballerinax/module-ballerinax-hubspot.crm.engagement.meeting` connector offers APIs to connect and interact with the [Hubspot Meetings API](https://developers.hubspot.com/docs/guides/api/crm/engagements/meetings) endpoints, specifically based on the [HubSpot REST API](https://developers.hubspot.com/docs/reference/api/overview). @@ -22,49 +22,52 @@ 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. 1. Go to Test accounts section from the left sidebar. -![Hubspot Developer Portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account.png) + ![Hubspot Developer Portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account.png) 2. Click on the "Create developer test account" button on the top right corner. -![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-test-account.png) + ![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-test-account.png) 3. In the pop-up window, provide a name for the test account and click on the `Create` button. -![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-account.png) + ![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-account.png) 4. You will see the newly created test account in the list of test accounts. -![Test account portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account-portal.png) + ![Test account portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account-portal.png) ### Step 3: Create a HubSpot App 1. Now navigate to the `Apps` section from the left sidebar and click on the `Create app` button on the top right corner. -![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-app.png) + ![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-app.png) 2. Provide a public app name and description for your app. -![App name description](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/app-name-desc.png) + ![App name description](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/app-name-desc.png) ### Step 4: Setup Authentication 1. Move to the `Auth` tab. -![Config auth](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/config-auth.png) + ![Config auth](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/config-auth.png) 2. In the `Scopes` section, add the following scopes for your app using the `Add new scopes` button. + - `crm.objects.contacts.read` - `crm.objects.contacts.write` -![add scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/add-scopes.png) + + ![add scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/add-scopes.png) 3. In the `Redirect URL` section, add the redirect URL for your app. This is the URL where the user will be redirected after the authentication process. You can use localhost for testing purposes. Then hit the `Create App` button. -![redirect url](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/redirect-url.png) + ![redirect url](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/redirect-url.png) ### Step 5: Get the Client ID and Client Secret Navigate to the `Auth` tab and you will see the `Client ID` and `Client Secret` for your app. Make sure to save these values. -![client-id-secret](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/client-id-secret.png) + + ![client-id-secret](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/client-id-secret.png) ### Step 6: Setup Authentication Flow @@ -76,18 +79,14 @@ Before proceeding with the Quickstart, ensure you have obtained the Access Token https://app.hubspot.com/oauth/authorize?client_id=&scope=&redirect_uri= ``` - Replace the ``, `` and `` with your specific value. + Replace the ``, ``, and `` with your specific value. -2. Paste it in the browser and select your developer test account to intall the app when prompted. +2. Paste it in the browser and select your developer test account to install the app when prompted. ![hubspot-oauth-consent-screen](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/hubspot-oauth-consent-screen.png) 3. A code will be displayed in the browser. Copy the code. - ``` - Received code: na1-129d-860c-xxxx-xxxx-xxxxxxxxxxxx - ``` - -4. Run the following curl command. Replace the ``, ` and `` with your specific value. Use the code you received in the above step 3 as the ``. +4. Run the following curl command. Replace the ``, ``, and `` with your specific value. Use the code you received in the above step 3 as the ``. - Linux/macOS @@ -126,10 +125,10 @@ To use the `HubSpot CRM Engagement Meeting` connector in your Ballerina applicat ### Step 1: Import the module -Import the ` hubspot.crm.engagement.meeting` module and `oauth2` module. +Import the `hubspot.crm.engagement.meeting` module and `oauth2` module. ```ballerina -import ballerinax/ hubspot.crm.engagement.meeting as meetings; +import ballerinax/hubspot.crm.engagement.meeting as meetings; import ballerina/oauth2; ``` @@ -145,7 +144,7 @@ import ballerina/oauth2; 2. Instantiate a `OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. - ```ballerina + ```ballerina configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; @@ -164,10 +163,10 @@ import ballerina/oauth2; ### 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. #### Read all Meetings - + ```ballerina public function main() returns error? { meetings:CollectionResponseSimplePublicObjectWithAssociationsForwardPaging meetings = check baseClient -> /crm/v3/objects/meetings; @@ -176,13 +175,10 @@ public function main() returns error? { ## Examples -The `HubSpot CRM Engagement Meeting` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples), covering the following use cases: - -1. [Meeting_batch](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples/Meeting_batch) -2. [Meeting_for_contacts](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples/Meeting_for_contacts) - +The `HubSpot CRM Engagement Meeting` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples), covering the following use cases: -[//]: # (TODO: Add examples) +1. [Meeting_batch](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples/meeting_batch) +2. [Meeting_for_contacts](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples/meeting_for_contacts) ## Build from the source diff --git a/ballerina/Module.md b/ballerina/Module.md index c406eee..d1b6cc5 100644 --- a/ballerina/Module.md +++ b/ballerina/Module.md @@ -1,6 +1,6 @@ ## Overview -[HubSpot ](https://www.hubspot.com/) is an AI-powered customer relationship management (CRM) platform. +[HubSpot ](https://www.hubspot.com/) is an AI-powered customer relationship management (CRM) platform. The `ballerinax/module-ballerinax-hubspot.crm.engagement.meeting` connector offers APIs to connect and interact with the [Hubspot Meetings API](https://developers.hubspot.com/docs/guides/api/crm/engagements/meetings) endpoints, specifically based on the [HubSpot REST API](https://developers.hubspot.com/docs/reference/api/overview). @@ -14,49 +14,52 @@ 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. 1. Go to Test accounts section from the left sidebar. -![Hubspot Developer Portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account.png) + ![Hubspot Developer Portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account.png) 2. Click on the "Create developer test account" button on the top right corner. -![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-test-account.png) + ![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-test-account.png) 3. In the pop-up window, provide a name for the test account and click on the `Create` button. -![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-account.png) + ![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-account.png) 4. You will see the newly created test account in the list of test accounts. -![Test account portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account-portal.png) + ![Test account portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account-portal.png) ### Step 3: Create a HubSpot App 1. Now navigate to the `Apps` section from the left sidebar and click on the `Create app` button on the top right corner. -![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-app.png) + ![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-app.png) 2. Provide a public app name and description for your app. -![App name description](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/app-name-desc.png) + ![App name description](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/app-name-desc.png) ### Step 4: Setup Authentication 1. Move to the `Auth` tab. -![Config auth](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/config-auth.png) + ![Config auth](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/config-auth.png) 2. In the `Scopes` section, add the following scopes for your app using the `Add new scopes` button. -- `crm.objects.contacts.read` -- `crm.objects.contacts.write` -![add scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/add-scopes.png) + + - `crm.objects.contacts.read` + - `crm.objects.contacts.write` + + ![add scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/add-scopes.png) 3. In the `Redirect URL` section, add the redirect URL for your app. This is the URL where the user will be redirected after the authentication process. You can use localhost for testing purposes. Then hit the `Create App` button. -![redirect url](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/redirect-url.png) + ![redirect url](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/redirect-url.png) ### Step 5: Get the Client ID and Client Secret Navigate to the `Auth` tab and you will see the `Client ID` and `Client Secret` for your app. Make sure to save these values. -![client-id-secret](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/client-id-secret.png) + + ![client-id-secret](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/client-id-secret.png) ### Step 6: Setup Authentication Flow @@ -68,18 +71,14 @@ Before proceeding with the Quickstart, ensure you have obtained the Access Token https://app.hubspot.com/oauth/authorize?client_id=&scope=&redirect_uri= ``` - Replace the ``, `` and `` with your specific value. + Replace the ``, ``, and `` with your specific value. -2. Paste it in the browser and select your developer test account to intall the app when prompted. +2. Paste it in the browser and select your developer test account to install the app when prompted. ![hubspot-oauth-consent-screen](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/hubspot-oauth-consent-screen.png) 3. A code will be displayed in the browser. Copy the code. - ``` - Received code: na1-129d-860c-xxxx-xxxx-xxxxxxxxxxxx - ``` - -4. Run the following curl command. Replace the ``, ` and `` with your specific value. Use the code you received in the above step 3 as the ``. +4. Run the following curl command. Replace the ``, ``, and `` with your specific value. Use the code you received in the above step 3 as the ``. - Linux/macOS @@ -118,10 +117,10 @@ To use the `HubSpot CRM Engagement Meeting` connector in your Ballerina applicat ### Step 1: Import the module -Import the ` hubspot.crm.engagement.meeting` module and `oauth2` module. +Import the `hubspot.crm.engagement.meeting` module and `oauth2` module. ```ballerina -import ballerinax/ hubspot.crm.engagement.meeting as meetings; +import ballerinax/hubspot.crm.engagement.meeting as meetings; import ballerina/oauth2; ``` @@ -137,7 +136,7 @@ import ballerina/oauth2; 2. Instantiate a `OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. - ```ballerina + ```ballerina configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; @@ -156,18 +155,19 @@ import ballerina/oauth2; ### 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. #### Read all Meetings - + ```ballerina public function main() returns error? { meetings:CollectionResponseSimplePublicObjectWithAssociationsForwardPaging meetings = check baseClient -> /crm/v3/objects/meetings; } ``` + ## Examples -The `HubSpot CRM Engagement Meeting` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples), covering the following use cases: +The `HubSpot CRM Engagement Meeting` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples), covering the following use cases: -1. [Meeting_batch](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples/Meeting_batch) -2. [Meeting_for_contacts](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples/Meeting_for_contacts) +1. [Meeting_batch](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples/meeting_batch) +2. [Meeting_for_contacts](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples/meeting_for_contacts) diff --git a/ballerina/Package.md b/ballerina/Package.md index c406eee..d1b6cc5 100644 --- a/ballerina/Package.md +++ b/ballerina/Package.md @@ -1,6 +1,6 @@ ## Overview -[HubSpot ](https://www.hubspot.com/) is an AI-powered customer relationship management (CRM) platform. +[HubSpot ](https://www.hubspot.com/) is an AI-powered customer relationship management (CRM) platform. The `ballerinax/module-ballerinax-hubspot.crm.engagement.meeting` connector offers APIs to connect and interact with the [Hubspot Meetings API](https://developers.hubspot.com/docs/guides/api/crm/engagements/meetings) endpoints, specifically based on the [HubSpot REST API](https://developers.hubspot.com/docs/reference/api/overview). @@ -14,49 +14,52 @@ 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. 1. Go to Test accounts section from the left sidebar. -![Hubspot Developer Portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account.png) + ![Hubspot Developer Portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account.png) 2. Click on the "Create developer test account" button on the top right corner. -![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-test-account.png) + ![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-test-account.png) 3. In the pop-up window, provide a name for the test account and click on the `Create` button. -![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-account.png) + ![Hubspot Developer Test Account](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-account.png) 4. You will see the newly created test account in the list of test accounts. -![Test account portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account-portal.png) + ![Test account portal](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/test-account-portal.png) ### Step 3: Create a HubSpot App 1. Now navigate to the `Apps` section from the left sidebar and click on the `Create app` button on the top right corner. -![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-app.png) + ![Create app](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/create-app.png) 2. Provide a public app name and description for your app. -![App name description](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/app-name-desc.png) + ![App name description](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/app-name-desc.png) ### Step 4: Setup Authentication 1. Move to the `Auth` tab. -![Config auth](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/config-auth.png) + ![Config auth](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/config-auth.png) 2. In the `Scopes` section, add the following scopes for your app using the `Add new scopes` button. -- `crm.objects.contacts.read` -- `crm.objects.contacts.write` -![add scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/add-scopes.png) + + - `crm.objects.contacts.read` + - `crm.objects.contacts.write` + + ![add scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/add-scopes.png) 3. In the `Redirect URL` section, add the redirect URL for your app. This is the URL where the user will be redirected after the authentication process. You can use localhost for testing purposes. Then hit the `Create App` button. -![redirect url](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/redirect-url.png) + ![redirect url](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/redirect-url.png) ### Step 5: Get the Client ID and Client Secret Navigate to the `Auth` tab and you will see the `Client ID` and `Client Secret` for your app. Make sure to save these values. -![client-id-secret](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/client-id-secret.png) + + ![client-id-secret](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/client-id-secret.png) ### Step 6: Setup Authentication Flow @@ -68,18 +71,14 @@ Before proceeding with the Quickstart, ensure you have obtained the Access Token https://app.hubspot.com/oauth/authorize?client_id=&scope=&redirect_uri= ``` - Replace the ``, `` and `` with your specific value. + Replace the ``, ``, and `` with your specific value. -2. Paste it in the browser and select your developer test account to intall the app when prompted. +2. Paste it in the browser and select your developer test account to install the app when prompted. ![hubspot-oauth-consent-screen](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/main/docs/setup/resources/hubspot-oauth-consent-screen.png) 3. A code will be displayed in the browser. Copy the code. - ``` - Received code: na1-129d-860c-xxxx-xxxx-xxxxxxxxxxxx - ``` - -4. Run the following curl command. Replace the ``, ` and `` with your specific value. Use the code you received in the above step 3 as the ``. +4. Run the following curl command. Replace the ``, ``, and `` with your specific value. Use the code you received in the above step 3 as the ``. - Linux/macOS @@ -118,10 +117,10 @@ To use the `HubSpot CRM Engagement Meeting` connector in your Ballerina applicat ### Step 1: Import the module -Import the ` hubspot.crm.engagement.meeting` module and `oauth2` module. +Import the `hubspot.crm.engagement.meeting` module and `oauth2` module. ```ballerina -import ballerinax/ hubspot.crm.engagement.meeting as meetings; +import ballerinax/hubspot.crm.engagement.meeting as meetings; import ballerina/oauth2; ``` @@ -137,7 +136,7 @@ import ballerina/oauth2; 2. Instantiate a `OAuth2RefreshTokenGrantConfig` with the obtained credentials and initialize the connector with it. - ```ballerina + ```ballerina configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; @@ -156,18 +155,19 @@ import ballerina/oauth2; ### 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. #### Read all Meetings - + ```ballerina public function main() returns error? { meetings:CollectionResponseSimplePublicObjectWithAssociationsForwardPaging meetings = check baseClient -> /crm/v3/objects/meetings; } ``` + ## Examples -The `HubSpot CRM Engagement Meeting` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples), covering the following use cases: +The `HubSpot CRM Engagement Meeting` connector provides practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples), covering the following use cases: -1. [Meeting_batch](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples/Meeting_batch) -2. [Meeting_for_contacts](https://github.com/ThisaraWeerakoon/module-ballerinax-hubspot.crm.engagement.meeting/tree/2649b2ba86bc717646d1ea98a71fbfc2b6c3106f/examples/Meeting_for_contacts) +1. [Meeting_batch](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples/meeting_batch) +2. [Meeting_for_contacts](https://github.com/ballerina-platform/module-ballerinax-hubspot.crm.engagement.meeting/tree/main/examples/meeting_for_contacts) diff --git a/examples/Meeting_batch/.devcontainer.json b/examples/Meeting_batch/.devcontainer.json deleted file mode 100644 index 75bd926..0000000 --- a/examples/Meeting_batch/.devcontainer.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "image": "ballerina/ballerina-devcontainer:2201.10.3", - "customizations": { - "vscode": { - "extensions": ["WSO2.ballerina"] - } - } -} diff --git a/examples/Meeting_for_contacts/.devcontainer.json b/examples/Meeting_for_contacts/.devcontainer.json deleted file mode 100644 index 75bd926..0000000 --- a/examples/Meeting_for_contacts/.devcontainer.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "image": "ballerina/ballerina-devcontainer:2201.10.3", - "customizations": { - "vscode": { - "extensions": ["WSO2.ballerina"] - } - } -} diff --git a/examples/README.md b/examples/README.md index 1bf33eb..1c99e5c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,16 +2,16 @@ The `ballerinax/hubspot.crm.engagement.meeting` connector provides practical examples illustrating usage in various scenarios. -1. [Meeting_batch](./Meeting_batch/) - Manage batch of meeting -2. [Meeting_for_contacts](./Meeting_for_contacts/) - Create update and archive meeting associated to a Contact +1. [Meeting_batch](./meeting_batch/) - Manage batch of meeting +2. [Meeting_for_contacts](./meeting_for_contacts/) - Create update and archive meeting associated to a Contact ## Prerequisites - **Ballerina:** Download and install Ballerina from [here](https://ballerina.io/downloads/). - **HubSpot developer account:** Create a HubSpot developer account and create an app to obtain the necessary credentials. Refer to the [Setup Guide](../ballerina/Package.md) for instructions. -- **`hubspot.crm.engagement.meeting` module:** Import the `ballerinax/hubspot.crm.engagement.meeting` module into your Ballerina project and configure it with the obtained credentials. Refer to the [Config.toml.template](./Meeting_batch/Config.toml.template) file for creating the `Config.toml` file. +- **`hubspot.crm.engagement.meeting` module:** Import the `ballerinax/hubspot.crm.engagement.meeting` module into your Ballerina project and configure it with the obtained credentials. Refer to the [`Config.toml.template`](./Meeting_batch/Config.toml.template) file for creating the `Config.toml` file. -``` +```ballerina import ballerinax/hubspot.crm.engagement.meeting as meeting; configurable string clientId = ?; @@ -29,7 +29,6 @@ meeting:OAuth2RefreshTokenGrantConfig auth = { final meeting:Client meetingClient = check new ({auth}); ``` - ## Running an example Execute the following commands to build an example from the source: diff --git a/issue_template.md b/issue_template.md deleted file mode 100644 index 52a7563..0000000 --- a/issue_template.md +++ /dev/null @@ -1,18 +0,0 @@ -**Description:** - - -**Suggested Labels:** - - -**Suggested Assignees:** - - -**Affected Product Version:** - -**OS, DB, other environment details and versions:** - -**Steps to reproduce:** - - -**Related Issues:** - diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 45221b5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,52 +0,0 @@ -## Purpose -> Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc. - -## Goals -> Describe the solutions that this feature/fix will introduce to resolve the problems described above - -## Approach -> Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here. - -## User stories -> Summary of user stories addressed by this change> - -## Release note -> Brief description of the new feature or bug fix as it will appear in the release notes - -## Documentation -> Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact - -## Training -> Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable - -## Certification -> Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why. - -## Marketing -> Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable - -## Automation tests - - Unit tests - > Code coverage information - - Integration tests - > Details about the test cases and coverage - -## Security checks - - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no - - Ran FindSecurityBugs plugin and verified report? yes/no - - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no - -## Samples -> Provide high-level details about the samples related to this feature - -## Related PRs -> List any other related PRs - -## Migrations (if applicable) -> Describe migration steps and platforms on which migration has been tested - -## Test environment -> List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested - -## Learning -> Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.