Skip to content

Instantly share code, notes, and snippets.

@dtolb
dtolb / test.py
Created May 19, 2020 16:29
Python Forward with Gather Ring Check
from flask import Flask, request
from bandwidth.voice.bxml.response import Response
from bandwidth.voice.bxml.verbs import SpeakSentence, Hangup, Transfer, PhoneNumber
import json
app = Flask(__name__)
FIRST_FORWARD_NUMBER = "+"
SECOND_FORWARD_NUMBER = "+"
@dtolb
dtolb / message.go
Last active May 1, 2020 19:46
Send Message in Go
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"log"
"os"
"io"
@dtolb
dtolb / gatherFallout.xml
Created June 6, 2018 20:11
testoutGatther
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Gather requestUrl="https://my-req-bin.herokuapp.com/yjhto7yj" requestUrlTimeout="10" terminatingDigits="#" maxDigits="1">
<SpeakSentence gender="female" locale="en_US" voice="susan">Please, press a digit.</SpeakSentence>
</Gather>
<SpeakSentence gender="female" locale="en_US" voice="susan">Oh NOOO you didn't press a button</SpeakSentence>
<Gather requestUrl="https://my-req-bin.herokuapp.com/yjhto7yj" requestUrlTimeout="10" terminatingDigits="#" maxDigits="2">
<SpeakSentence gender="female" locale="en_US" voice="susan">Now Please, press two digits.</SpeakSentence>
</Gather>
</Response>
@dtolb
dtolb / sample-bxml-teltec.xml
Last active March 20, 2018 20:30
sample-bxml.xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<PlayAudio>https://audio.url/voicemailBeep.mp3</PlayAudio>
<Record requestUrl="https://record.url.server/recordVoicemail" transcribe="true" transcribeCallbackUrl="https://transcribe.url/result"/ >
</Response>
@dtolb
dtolb / Sample-tutorial.md
Last active March 19, 2018 20:18
Sample-tutorial.md
@dtolb
dtolb / kbsetup.json
Created December 17, 2017 04:21
keysetup.json
{
"title": "Windows keys",
"rules": [
{
"description": "Home/end setup",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "y",
@dtolb
dtolb / docs_v3.md
Last active June 15, 2017 17:21
Final iris

Customer Facing API Docs

We need to push the official API spec down to the developers who are working on the code. Catapult Documentation is currently at risk of becoming out of sync with the API behavior. Any documentation changes have to be funneled from the development team to the dev x team.

The state of things

  • Iris (dashboard, numbers API) currently documented in its entirety using a custom pre-processed RAML0.8
    • Major reason for pre-processed is to keep internal APIS hidden from external users example: GET /accounts
  • Iris has about ~600 endpoint/method combinations documented in RAML0.8
  • Catapult (Application Platform, voice & messaging APIs) has used swagger (open api spec) minimally to document v2 APIs, but the core API doesn't have an official API Spec.

Bandwidth Dashboard REST API Documentation API documentation version v1

http://null


/accounts

The account is the root resource for many of the operations in the Bandwidth Dashboard API.
The account is represented by an account id, which is the resource that represents a Bandwidth customer, providing a root resource for all of the customer's attributes and services
The API calls that are used to manage the details of a customer account, and to manage the resources that a Bandwidth customer has access to or control over, are accessed through the /accounts resource.

@dtolb
dtolb / example_find.py
Last active April 19, 2017 23:55
Find and save python examples
#!/usr/bin/python
# import modules
import os
import glob
import shutil
import pprint
import sys
import getopt