Skip to content

Bandwidth/ruby-sdk

Repository files navigation

bandwidth-sdk

Gem VersionTestsRuby Style Guide

OSRuby
Windows 20223.0, 3.1, 3.2, 3.3
Windows 20253.0, 3.1, 3.2, 3.3
Ubuntu 22.043.0, 3.1, 3.2, 3.3
Ubuntu 24.043.0, 3.1, 3.2, 3.3

Bandwidth - the Ruby gem for the Bandwidth SDK

Generated with the command:

openapi-generator generate -g ruby -i bandwidth.yml -c openapi-config.yml -o ./

Bandwidth's Communication APIs

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://dev.bandwidth.com

Installation

Install from RubyGems

gem install bandwidth-sdk

Build a gem

To build the Ruby code into a gem:

gem build bandwidth-sdk.gemspec

Then either install the gem locally:

gem install ./bandwidth-sdk-1.0.0.gem

(for development, run gem install --dev ./bandwidth-sdk-1.0.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'bandwidth-sdk', '~> 1.0.0' 

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'bandwidth-sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git' 

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gemrequire'bandwidth-sdk'# Setup authorizationBandwidth.configuredo |config| # Configure HTTP basic authorization: Basicconfig.username='YOUR_USERNAME'config.password='YOUR_PASSWORD'# Configure faraday connectionconfig.configure_faraday_connection{ |connection| 'YOUR CONNECTION CONFIG PROC'}# Configure OAuth2 access token for authorization: OAuth2config.access_token='YOUR_ACCESS TOKEN'# Or use your client ID and client secret to obtain an access tokenconfig.client_id='YOUR_CLIENT_ID'config.client_secret='YOUR_CLIENT_SECRET'# Configure a proc to get access tokens in lieu of the static access_token configurationconfig.access_token_getter=->{'YOUR TOKEN GETTER PROC'}# Configure faraday connectionconfig.configure_faraday_connection{ |connection| 'YOUR CONNECTION CONFIG PROC'}endapi_instance=Bandwidth::CallsApi.newaccount_id='9900000'# String | Your Bandwidth Account ID.create_call=Bandwidth::CreateCall.new({to: '+19195551234',from: '+15555551212',application_id: '1234-qwer-5679-tyui',answer_url: 'https://www.myCallbackServer.example/webhooks/answer'})# CreateCall | JSON object containing information to create an outbound callbegin#Create Callresult=api_instance.create_call(account_id,create_call)presultrescueBandwidth::ApiError=>eputs"Exception when calling CallsApi->create_call: #{e}"end

Documentation for API Endpoints

All URIs are relative to http://localhost

ClassMethodHTTP requestDescription
Bandwidth::CallsApicreate_callPOST /accounts/{accountId}/callsCreate Call
Bandwidth::CallsApiget_call_stateGET /accounts/{accountId}/calls/{callId}Get Call State Information
Bandwidth::CallsApilist_callsGET /accounts/{accountId}/callsGet Calls
Bandwidth::CallsApiupdate_callPOST /accounts/{accountId}/calls/{callId}Update Call
Bandwidth::CallsApiupdate_call_bxmlPUT /accounts/{accountId}/calls/{callId}/bxmlUpdate Call BXML
Bandwidth::ConferencesApidownload_conference_recordingGET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/mediaDownload Conference Recording
Bandwidth::ConferencesApiget_conferenceGET /accounts/{accountId}/conferences/{conferenceId}Get Conference Information
Bandwidth::ConferencesApiget_conference_memberGET /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}Get Conference Member
Bandwidth::ConferencesApiget_conference_recordingGET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}Get Conference Recording Information
Bandwidth::ConferencesApilist_conference_recordingsGET /accounts/{accountId}/conferences/{conferenceId}/recordingsGet Conference Recordings
Bandwidth::ConferencesApilist_conferencesGET /accounts/{accountId}/conferencesGet Conferences
Bandwidth::ConferencesApiupdate_conferencePOST /accounts/{accountId}/conferences/{conferenceId}Update Conference
Bandwidth::ConferencesApiupdate_conference_bxmlPUT /accounts/{accountId}/conferences/{conferenceId}/bxmlUpdate Conference BXML
Bandwidth::ConferencesApiupdate_conference_memberPUT /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}Update Conference Member
Bandwidth::MFAApigenerate_messaging_codePOST /accounts/{accountId}/code/messagingMessaging Authentication Code
Bandwidth::MFAApigenerate_voice_codePOST /accounts/{accountId}/code/voiceVoice Authentication Code
Bandwidth::MFAApiverify_codePOST /accounts/{accountId}/code/verifyVerify Authentication Code
Bandwidth::MediaApidelete_mediaDELETE /users/{accountId}/media/{mediaId}Delete Media
Bandwidth::MediaApiget_mediaGET /users/{accountId}/media/{mediaId}Get Media
Bandwidth::MediaApilist_mediaGET /users/{accountId}/mediaList Media
Bandwidth::MediaApiupload_mediaPUT /users/{accountId}/media/{mediaId}Upload Media
Bandwidth::MessagesApicreate_messagePOST /users/{accountId}/messagesCreate Message
Bandwidth::MessagesApilist_messagesGET /users/{accountId}/messagesList Messages
Bandwidth::MultiChannelApicreate_multi_channel_messagePOST /users/{accountId}/messages/multiChannelCreate Multi-Channel Message
Bandwidth::PhoneNumberLookupApicreate_async_bulk_lookupPOST /accounts/{accountId}/phoneNumberLookup/bulkCreate Asynchronous Bulk Number Lookup
Bandwidth::PhoneNumberLookupApicreate_sync_lookupPOST /accounts/{accountId}/phoneNumberLookupCreate Synchronous Number Lookup
Bandwidth::PhoneNumberLookupApiget_async_bulk_lookupGET /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}Get Asynchronous Bulk Number Lookup
Bandwidth::RecordingsApidelete_recordingDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}Delete Recording
Bandwidth::RecordingsApidelete_recording_mediaDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/mediaDelete Recording Media
Bandwidth::RecordingsApidelete_recording_transcriptionDELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionDelete Transcription
Bandwidth::RecordingsApidownload_call_recordingGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/mediaDownload Recording
Bandwidth::RecordingsApiget_call_recordingGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}Get Call Recording
Bandwidth::RecordingsApiget_recording_transcriptionGET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionGet Transcription
Bandwidth::RecordingsApilist_account_call_recordingsGET /accounts/{accountId}/recordingsGet Call Recordings
Bandwidth::RecordingsApilist_call_recordingsGET /accounts/{accountId}/calls/{callId}/recordingsList Call Recordings
Bandwidth::RecordingsApitranscribe_call_recordingPOST /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcriptionCreate Transcription Request
Bandwidth::RecordingsApiupdate_call_recording_statePUT /accounts/{accountId}/calls/{callId}/recordingUpdate Recording
Bandwidth::StatisticsApiget_statisticsGET /accounts/{accountId}/statisticsGet Account Statistics
Bandwidth::TollFreeVerificationApicreate_webhook_subscriptionPOST /accounts/{accountId}/tollFreeVerification/webhooks/subscriptionsCreate Webhook Subscription
Bandwidth::TollFreeVerificationApidelete_verification_requestDELETE /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationDelete a Toll-Free Verification Submission
Bandwidth::TollFreeVerificationApidelete_webhook_subscriptionDELETE /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}Delete Webhook Subscription
Bandwidth::TollFreeVerificationApiget_toll_free_verification_statusGET /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationGet Toll-Free Verification Status
Bandwidth::TollFreeVerificationApilist_toll_free_use_casesGET /tollFreeVerification/useCasesList Toll-Free Use Cases
Bandwidth::TollFreeVerificationApilist_webhook_subscriptionsGET /accounts/{accountId}/tollFreeVerification/webhooks/subscriptionsList Webhook Subscriptions
Bandwidth::TollFreeVerificationApirequest_toll_free_verificationPOST /accounts/{accountId}/tollFreeVerificationRequest Toll-Free Verification
Bandwidth::TollFreeVerificationApiupdate_toll_free_verification_requestPUT /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerificationUpdate Toll-Free Verification Request
Bandwidth::TollFreeVerificationApiupdate_webhook_subscriptionPUT /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}Update Webhook Subscription
Bandwidth::TranscriptionsApidelete_real_time_transcriptionDELETE /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}Delete Real-time Transcription
Bandwidth::TranscriptionsApiget_real_time_transcriptionGET /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}Get Real-time Transcription
Bandwidth::TranscriptionsApilist_real_time_transcriptionsGET /accounts/{accountId}/calls/{callId}/transcriptionsList Real-time Transcriptions

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

Basic

  • Type: HTTP basic authentication

OAuth2

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes: N/A

About

Bandwidth Ruby SDK

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 17