{"id":20364349,"url":"https://github.com/bandwidth/node-voice","last_synced_at":"2025-04-12T04:41:36.504Z","repository":{"id":36476764,"uuid":"227411795","full_name":"Bandwidth/node-voice","owner":"Bandwidth","description":"Node SDK for Bandwidth Voice","archived":false,"fork":false,"pushed_at":"2025-03-25T03:23:37.000Z","size":2579,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-25T04:24:05.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dev.bandwidth.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bandwidth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-11T16:31:54.000Z","updated_at":"2025-02-12T21:16:18.000Z","dependencies_parsed_at":"2023-11-07T16:26:40.789Z","dependency_job_id":"2c24fb9c-ba84-412b-bf1f-40300cf81131","html_url":"https://github.com/Bandwidth/node-voice","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-voice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-voice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-voice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bandwidth%2Fnode-voice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bandwidth","download_url":"https://codeload.github.com/Bandwidth/node-voice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519263,"owners_count":21117756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T00:11:23.278Z","updated_at":"2025-04-12T04:41:36.468Z","avatar_url":"https://github.com/Bandwidth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# $${\\color{orange}This \\space package  \\space has  \\space been  \\space deprecated}$$\r\n# Please use the new [node-sdk](https://github.com/Bandwidth/node-sdk)\r\n## The new package is on NPM as [bandwidth-sdk](https://www.npmjs.com/package/bandwidth-sdk) (`npm i bandwidth-sdk`)\r\n\r\n# Bandwidth Node Voice SDK\r\n\r\n[![Test](https://github.com/Bandwidth/node-voice/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/node-voice/actions/workflows/test.yml)\r\n\r\n| **OS** | **Node** |\r\n|:---:|:---:|\r\n| Windows 2016 | 12, 14, 16 |\r\n| Windows 2019 | 12, 14, 16 |\r\n| Ubuntu 20.04 | 12, 14, 16 |\r\n| Ubuntu 22.04 | 12, 14, 16 |\r\n\r\n\r\nNote: As of version 2.0.0, this package has been upgraded to TypeScript\r\n\r\n## Getting Started\r\n\r\n### Installation\r\n\r\n```\r\nnpm install @bandwidth/voice\r\n```\r\n\r\n### Initialize\r\n\r\n```\r\nimport { CreateCallRequest, ApiError, ApiController, Client, Response, SpeakSentence } from '@bandwidth/voice';\r\nconst client = new Client({\r\n    basicAuthUserName: \"username\",\r\n    basicAuthPassword: \"password\"\r\n});\r\n\r\nconst controller = new ApiController(client);\r\nconst accountId = \"12345\";\r\n```\r\n\r\n*To use a custom environment*\r\n```\r\nimport { ApiController, Client, Environment } from '@bandwidth/voice';\r\nconst client = new Client({\r\n    basicAuthUserName: \"username\",\r\n    basicAuthPassword: \"password\",\r\n    environment: Environment.Custom,\r\n    baseUrl: 'https://custom.bandwidth.com'\r\n});\r\n\r\nconst controller = new ApiController(client);\r\nconst accountId = \"12345\";\r\n```\r\n\r\n### Create A Phone Call\r\n\r\n```\r\nvar from = \"+15554443333\";\r\nvar to = \"+15553334444\";\r\nvar answerUrl = \"https://sample.com\";\r\nvar applicationId = \"3-a-b-c\";\r\nvar body = {\r\n    from: from,\r\n    to: to,\r\n    answerUrl: answerUrl,\r\n    applicationId: applicationId,\r\n};\r\n\r\nvar createCallResponse = await controller.createCall(accountId, body);\r\nconsole.log(createCallResponse.result.callId);\r\n```\r\n\r\n### Create BXML\r\n\r\n```\r\nvar speakSentence = new SpeakSentence({\r\n    sentence: \"test\",\r\n    voice: \"susan\",\r\n    gender: \"female\",\r\n    locale: \"en_US\",\r\n});\r\n\r\nvar response = new Response(speakSentence);\r\n\r\nconsole.log(response.toBxml());\r\n```\r\n\r\n## Supported Node Versions\r\n\r\nThis package can be used with Node \u003e= 10\r\n\r\n\r\n## Credentials\r\n\r\nInformation for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandwidth%2Fnode-voice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbandwidth%2Fnode-voice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbandwidth%2Fnode-voice/lists"}