diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 108bb90..652e2d6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,14 +16,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-2022, windows-2019, ubuntu-18.04, ubuntu-20.04] + os: [windows-2022, windows-2019, ubuntu-20.04, ubuntu-22.04] node-version: ['12', '14', '16'] steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} diff --git a/README.md b/README.md index 900023b..47ebf0d 100644 --- a/README.md +++ b/README.md @@ -1,62 +1,62 @@ -# Bandwidth Node Messaging SDK - -[![Test](https://github.com/Bandwidth/node-messaging/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/node-messaging/actions/workflows/test.yml) - -| **OS** | **Node** | -|:---:|:---:| -| Windows 2016 | 12, 14, 16 | -| Windows 2019 | 12, 14, 16 | -| Ubuntu 18.04 | 12, 14, 16 | -| Ubuntu 20.04 | 12, 14, 16 | - -Note: As of version 3.0.0, this package has been upgraded to TypeScript - -## Getting Started - -### Installation - -``` -npm install @bandwidth/messaging -``` - -### Initialize - -```js -import { Client, ApiController, MessageRequest } from '@bandwidth/messaging'; -const client = new Client({ - basicAuthUserName: "username", - basicAuthPassword: "password" -}); - -const controller = new ApiController(client); -const accountId = "12345"; -``` - -### Send A Text Message -```js -const applicationId = "3-a-b-c"; -const toPhoneNumber = "+15554443333"; -const fromPhoneNumber = "+15553334444"; -const text = "Hello world"; -const body = { - applicationId: applicationId, - to: [toPhoneNumber], - from: fromPhoneNumber, - text: text -}; - -const createMessageResponse = await controller.createMessage(accountId, body); -console.log(createMessageResponse.result.id); -``` - -## Supported Node Versions - -This package can be used with Node >= 10 - -## Documentation - -Documentation for this package can be found at https://dev.bandwidth.com/sdks/node.html - -## Credentials - -Information for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html +# Bandwidth Node Messaging SDK + +[![Test](https://github.com/Bandwidth/node-messaging/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/node-messaging/actions/workflows/test.yml) + +| **OS** | **Node** | +|:---:|:---:| +| Windows 2016 | 12, 14, 16 | +| Windows 2019 | 12, 14, 16 | +| Ubuntu 20.04 | 12, 14, 16 | +| Ubuntu 22.04 | 12, 14, 16 | + +Note: As of version 3.0.0, this package has been upgraded to TypeScript + +## Getting Started + +### Installation + +``` +npm install @bandwidth/messaging +``` + +### Initialize + +```js +import { Client, ApiController, MessageRequest } from '@bandwidth/messaging'; +const client = new Client({ + basicAuthUserName: "username", + basicAuthPassword: "password" +}); + +const controller = new ApiController(client); +const accountId = "12345"; +``` + +### Send A Text Message +```js +const applicationId = "3-a-b-c"; +const toPhoneNumber = "+15554443333"; +const fromPhoneNumber = "+15553334444"; +const text = "Hello world"; +const body = { + applicationId: applicationId, + to: [toPhoneNumber], + from: fromPhoneNumber, + text: text +}; + +const createMessageResponse = await controller.createMessage(accountId, body); +console.log(createMessageResponse.result.id); +``` + +## Supported Node Versions + +This package can be used with Node >= 10 + +## Documentation + +Documentation for this package can be found at https://dev.bandwidth.com/sdks/node.html + +## Credentials + +Information for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html