From 602f9454abb96351ca2f2a5a1329b2ab200c5301 Mon Sep 17 00:00:00 2001 From: Danny Simms <103758200+GreyNewfie@users.noreply.github.com> Date: Sun, 8 Jun 2025 19:05:53 -0230 Subject: [PATCH 1/5] Correct the Server SDK docs Node region specific examples - Fix the initialize with specific region example - Remove the Region variable option --- docs/reference/server.md | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/docs/reference/server.md b/docs/reference/server.md index 3474db8..e6033d7 100644 --- a/docs/reference/server.md +++ b/docs/reference/server.md @@ -82,32 +82,21 @@ import notificationapi from 'notificationapi-node-server-sdk'; notificationapi.init('CLIENT_ID', 'CLIENT_SECRET'); ``` -| Name | Type | Description | -| ----------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | -| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | -| `config` | InitConfiguration | Optional configuration object for additional initialization options | -| `config.baseURL` | string \| Region | To choose a different region other than default (https://api.notificationapi.com).
Can be a region constant (e.g. Region.EU_REGION or Region.CA_REGION)
or a custom URL string (e.g. 'https://api.eu.notificationapi.com' or 'https://api.ca.notificationapi.com') | +| Name | Type | Description | +| ----------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | +| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | +| `config` | InitConfiguration | Optional configuration object for additional initialization options | +| `config.baseURL` | string \| Region | To choose a different region other than default (https://api.notificationapi.com), use 'https://api.eu.notificationapi.com' for EU region or 'https://api.ca.notificationapi.com' for CA region. | \* required -Region specific example using imported Region: - -```js -import notificationapi from 'notificationapi-node-server-sdk'; -import { Region } from 'notificationapi-node-server-sdk'; - -notificationapi = NotificationAPI.new('CLIENT_ID', 'CLIENT_SECRET', { - baseURL: Region.EU_REGION -}); -``` - -Region specific example using string: +Region specific example: ```js import notificationapi from 'notificationapi-node-server-sdk'; -notificationapi = NotificationAPI.new('CLIENT_ID', 'CLIENT_SECRET', { +notificationapi.init('CLIENT_ID', 'CLIENT_SECRET', { baseURL: 'https://api.eu.notificationapi.com' }); ``` From 90a98cbf780e388dc1f9e3dbf775d6bc0f2a9241 Mon Sep 17 00:00:00 2001 From: Danny Simms <103758200+GreyNewfie@users.noreply.github.com> Date: Sun, 8 Jun 2025 19:17:34 -0230 Subject: [PATCH 2/5] Update server documentation for region-specific Python initialization examples - Simplified the region-specific example by removing the variable option and clarifying the use of direct URLs for EU and CA regions. --- docs/reference/server.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/reference/server.md b/docs/reference/server.md index e6033d7..f7bfefe 100644 --- a/docs/reference/server.md +++ b/docs/reference/server.md @@ -122,23 +122,15 @@ from notificationapi_python_server_sdk import notificationapi notificationapi.init("CLIENT_ID", "CLIENT_SECRET") ``` -| Name | Type | Description | -| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | -| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | -| `base_url` | string | To choose a different region than default (https://api.notificationapi.com). Can be a region constant (e.g. EU_REGION or CA_REGION) or a custom URL string (e.g. 'https://api.eu.notificationapi.com'). | +| Name | Type | Description | +| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | +| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | +| `base_url` | string | To choose a different region than default (https://api.notificationapi.com), use 'https://api.eu.notificationapi.com' for EU region and 'https://api.ca.notificationapi.com for CA region. | \* required -Region specific example using imported Region constant: - -```python -from notificationapi_python_server_sdk import notificationapi, EU_REGION - -notificationapi.init("CLIENT_ID", "CLIENT_SECRET", EU_REGION) -``` - -Region specific example using string: +Region specific example: ```python notificationapi.init("CLIENT_ID", "CLIENT_SECRET", "https://api.eu.notificationapi.com") From 043780af612f43079831dc00cbf8a1e141648d17 Mon Sep 17 00:00:00 2001 From: Danny Simms <103758200+GreyNewfie@users.noreply.github.com> Date: Sun, 8 Jun 2025 19:27:27 -0230 Subject: [PATCH 3/5] Update server docs PHP initialization code examples - Updated the region-specific example to clarify the use of direct URLs for EU and CA regions. - Removed unnecessary variable options for initialization --- docs/reference/server.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/docs/reference/server.md b/docs/reference/server.md index f7bfefe..a51285f 100644 --- a/docs/reference/server.md +++ b/docs/reference/server.md @@ -157,28 +157,20 @@ use NotificationAPI\NotificationAPI; $notificationapi = new NotificationAPI('CLIENT_ID', 'CLIENT_SECRET'); ``` -| Name | Type | Description | -| ----------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | -| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | -| `baseURL` | string | To choose a different region than default US region (https://api.notificationapi.com). Can be a public region constant (e.g. NotificationAPI::EU_REGION or NotificationAPI::CA_REGION) or a custom URL string (e.g. 'https://api.eu.notificationapi.com'). | +| Name | Type | Description | +| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | +| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | +| `baseURL` | string | To choose a different region than default (https://api.notificationapi.com), use 'https://api.eu.notificationapi.com' for EU region and 'https://api.ca.notificationapi.com for CA region. | \* required -Region specific example using public region constant: - -```php -use NotificationAPI\NotificationAPI; - -notificationapi.init("CLIENT_ID", "CLIENT_SECRET", NotificationAPI::EU_REGION) -``` - -Region specific example using string: +Region specific example: ```php use NotificationAPI\NotificationAPI; -notificationapi = NotificationAPI.new("CLIENT_ID", "CLIENT_SECRET", "https://api.eu.notificationapi.com"); +$notificationapi = new NotificationAPI("CLIENT_ID", "CLIENT_SECRET", "https://api.eu.notificationapi.com"); ``` From 963b47f406a0808a6cb478e40f7dc8e73f657986 Mon Sep 17 00:00:00 2001 From: Danny Simms <103758200+GreyNewfie@users.noreply.github.com> Date: Sun, 8 Jun 2025 19:38:04 -0230 Subject: [PATCH 4/5] Refine server documentation for PHP initialization examples - Simplified the region-specific example by removing the variable initialization option. --- docs/reference/server.md | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/docs/reference/server.md b/docs/reference/server.md index a51285f..2861fb6 100644 --- a/docs/reference/server.md +++ b/docs/reference/server.md @@ -368,15 +368,15 @@ import ( notificationapi.Init("CLIENT_ID", "CLIENT_SECRET", "base_url") ``` -| Name | Type | Description | -| ----------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | -| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | -| `base_url`\* | string | To set the region. Use https://api.notificationapi.com for US region, https://api.ca.notificationapi.com for Canada region, and https://api.eu.notificationapi.com for EU region. Can also use region constants US_REGION, CA_REGION or EU_REGION (e.g. notificationapi.US_REGION) | +| Name | Type | Description | +| ----------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | +| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | +| `base_url`\* | string | To set the region. Use https://api.notificationapi.com for US region, https://api.ca.notificationapi.com for Canada region, and https://api.eu.notificationapi.com for EU region. | \* required -Region specific example using public region constant: +Region specific example: ```Go use NotificationAPI\NotificationAPI; @@ -384,14 +384,6 @@ use NotificationAPI\NotificationAPI; notificationapi.init("CLIENT_ID", "CLIENT_SECRET", notificationapi.EU_REGION) ``` -Region specific example using string: - -```Go -use NotificationAPI\NotificationAPI; - -notificationapi = NotificationAPI.new("CLIENT_ID", "CLIENT_SECRET", "https://api.eu.notificationapi.com"); -``` - From faa12f8228b548ab091cd0da149d11881106a8c8 Mon Sep 17 00:00:00 2001 From: Danny Simms <103758200+GreyNewfie@users.noreply.github.com> Date: Sun, 8 Jun 2025 19:41:30 -0230 Subject: [PATCH 5/5] Update server documentation for C# region-specific examples - Simplified the region-specific example by removing unnecessary variable initialization options. --- docs/reference/server.md | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/docs/reference/server.md b/docs/reference/server.md index 2861fb6..810a872 100644 --- a/docs/reference/server.md +++ b/docs/reference/server.md @@ -406,24 +406,16 @@ using NotificationApi.Server.Models; var notificationApi = new NotificationApiServer("CLIENT_ID", "CLIENT_SECRET", false); ``` -| Name | Type | Description | -| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | -| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | -| `secureMode` \* | boolean | Controlls sending notifications in secure mode. Set to `true` or `false`. | -| `baseURL` | string | To choose a different region than default (US). Use https://api.ca.notificationapi.com for Canada region, or https://api.eu.notificationapi.com for Europe region. Can also use region constants CA_BASE_URL or EU_BASE_URL (e.g. NotificationApiServer.CA_BASE_URL) | +| Name | Type | Description | +| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `CLIENT_ID`\* | string | Your NotificationAPI account clientId. You can get it from [here](https://app.notificationapi.com/environments). | +| `CLIENT_SECRET`\* | string | Your NotificationAPI account client secret. You can get it from [here](https://app.notificationapi.com/environments). | +| `secureMode` \* | boolean | Controlls sending notifications in secure mode. Set to `true` or `false`. | +| `baseURL` | string | To choose a different region than default (US). Use https://api.ca.notificationapi.com for Canada region, or https://api.eu.notificationapi.com for Europe region. | \* required -Region specific example using region constant: - -```csharp -using NotificationApi.Server; - -var notificationApi = new NotificationApiServer("CLIENT_ID", "CLIENT_SECRET", false, NotificationApiServer.EU_BASE_URL); -``` - -Region specific example using string: +Region specific example: ```csharp using NotificationApi.Server;