Skip to content

Commit ca0e90a

Browse files
committed
Merge branch 'develop'
2 parents 703eac9 + d797feb commit ca0e90a

File tree

15 files changed

+2066
-601
lines changed

15 files changed

+2066
-601
lines changed

.editorconfig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Python files 4 space indentation
12+
[*.py]
13+
charset = utf-8
14+
indent_style = space
15+
indent_size = 4
16+
17+
# Makefiles tab indentation
18+
[Makefile]
19+
indent_style = tab
20+
21+
# Yaml files 2-space indentation
22+
[*.yml]
23+
indent_style = space
24+
indent_size = 2

CHANGES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 1.5.0
2+
3+
* Added ability to provide a file path as private_key param no the nexmo.Client constructor
4+
5+
* Added send/stop endpoints for audio/speech/dtmf
6+
7+
* Added new number insight endpoints
8+
19
# 1.4.0
210

311
* Added new Voice API call methods

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,48 @@ response = client.update_call(uuid, action='hangup')
117117

118118
Docs: [https://docs.nexmo.com/voice/voice-api/api-reference#call_modify_single](https://docs.nexmo.com/voice/voice-api/api-reference#call_modify_single?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library)
119119

120+
### Stream audio to a call
121+
122+
```python
123+
stream_url = 'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'
124+
125+
response = client.send_audio(uuid, stream_url=stream_url)
126+
```
127+
128+
Docs: [https://docs.nexmo.com/voice/voice-api/api-reference#stream_put](https://docs.nexmo.com/voice/voice-api/api-reference#stream_put?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library)
129+
130+
### Stop streaming audio to a call
131+
132+
```python
133+
response = client.stop_audio(uuid)
134+
```
135+
136+
Docs: [https://docs.nexmo.com/voice/voice-api/api-reference#stream_delete](https://docs.nexmo.com/voice/voice-api/api-reference#stream_delete?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library)
137+
138+
### Send a synthesized speech message to a call
139+
140+
```python
141+
response = client.send_speech(uuid, text='Hello')
142+
```
143+
144+
Docs: [https://docs.nexmo.com/voice/voice-api/api-reference#talk_put](https://docs.nexmo.com/voice/voice-api/api-reference#talk_put?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library)
145+
146+
### Stop sending a synthesized speech message to a call
147+
148+
```python
149+
response = client.stop_speech(uuid)
150+
```
151+
152+
Docs: [https://docs.nexmo.com/voice/voice-api/api-reference#talk_delete](https://docs.nexmo.com/voice/voice-api/api-reference#talk_delete?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library)
153+
154+
### Send DTMF tones to a call
155+
156+
```python
157+
response = client.send_dtmf(uuid, digits='1234')
158+
```
159+
160+
Docs: [https://docs.nexmo.com/voice/voice-api/api-reference#dtmf_put](https://docs.nexmo.com/voice/voice-api/api-reference#dtmf_put?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library)
161+
120162

121163
## Verify API
122164

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_build

docs/Makefile

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
BUILDDIR = _build
9+
10+
# Internal variables.
11+
PAPEROPT_a4 = -D latex_paper_size=a4
12+
PAPEROPT_letter = -D latex_paper_size=letter
13+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
14+
# the i18n builder cannot share the environment and doctrees with the others
15+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16+
17+
.PHONY: help
18+
help:
19+
@echo "Please use \`make <target>' where <target> is one of"
20+
@echo " html to make standalone HTML files"
21+
@echo " dirhtml to make HTML files named index.html in directories"
22+
@echo " singlehtml to make a single large HTML file"
23+
@echo " pickle to make pickle files"
24+
@echo " json to make JSON files"
25+
@echo " htmlhelp to make HTML files and a HTML help project"
26+
@echo " qthelp to make HTML files and a qthelp project"
27+
@echo " applehelp to make an Apple Help Book"
28+
@echo " devhelp to make HTML files and a Devhelp project"
29+
@echo " epub to make an epub"
30+
@echo " epub3 to make an epub3"
31+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
32+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
33+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
34+
@echo " text to make text files"
35+
@echo " man to make manual pages"
36+
@echo " texinfo to make Texinfo files"
37+
@echo " info to make Texinfo files and run them through makeinfo"
38+
@echo " gettext to make PO message catalogs"
39+
@echo " changes to make an overview of all changed/added/deprecated items"
40+
@echo " xml to make Docutils-native XML files"
41+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
42+
@echo " linkcheck to check all external links for integrity"
43+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
44+
@echo " coverage to run coverage check of the documentation (if enabled)"
45+
@echo " dummy to check syntax errors of document sources"
46+
47+
.PHONY: clean
48+
clean:
49+
rm -rf $(BUILDDIR)/*
50+
51+
quickstart.rst: ../README.md
52+
pandoc -f markdown -t rst ../README.md -o quickstart.rst
53+
54+
.PHONY: html
55+
html: quickstart.rst
56+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
57+
@echo
58+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
59+
60+
.PHONY: dirhtml
61+
dirhtml:
62+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
63+
@echo
64+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
65+
66+
.PHONY: singlehtml
67+
singlehtml:
68+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
69+
@echo
70+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
71+
72+
.PHONY: pickle
73+
pickle:
74+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
75+
@echo
76+
@echo "Build finished; now you can process the pickle files."
77+
78+
.PHONY: json
79+
json:
80+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
81+
@echo
82+
@echo "Build finished; now you can process the JSON files."
83+
84+
.PHONY: htmlhelp
85+
htmlhelp:
86+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
87+
@echo
88+
@echo "Build finished; now you can run HTML Help Workshop with the" \
89+
".hhp project file in $(BUILDDIR)/htmlhelp."
90+
91+
.PHONY: qthelp
92+
qthelp:
93+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
94+
@echo
95+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
96+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
97+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Nexmo.qhcp"
98+
@echo "To view the help file:"
99+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Nexmo.qhc"
100+
101+
.PHONY: applehelp
102+
applehelp:
103+
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
104+
@echo
105+
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
106+
@echo "N.B. You won't be able to view it unless you put it in" \
107+
"~/Library/Documentation/Help or install it in your application" \
108+
"bundle."
109+
110+
.PHONY: devhelp
111+
devhelp:
112+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
113+
@echo
114+
@echo "Build finished."
115+
@echo "To view the help file:"
116+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Nexmo"
117+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Nexmo"
118+
@echo "# devhelp"
119+
120+
.PHONY: epub
121+
epub:
122+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
123+
@echo
124+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
125+
126+
.PHONY: epub3
127+
epub3:
128+
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
129+
@echo
130+
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
131+
132+
.PHONY: latex
133+
latex:
134+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
135+
@echo
136+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
137+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
138+
"(use \`make latexpdf' here to do that automatically)."
139+
140+
.PHONY: latexpdf
141+
latexpdf:
142+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
143+
@echo "Running LaTeX files through pdflatex..."
144+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
145+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
146+
147+
.PHONY: latexpdfja
148+
latexpdfja:
149+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
150+
@echo "Running LaTeX files through platex and dvipdfmx..."
151+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
152+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
153+
154+
.PHONY: text
155+
text:
156+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
157+
@echo
158+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
159+
160+
.PHONY: man
161+
man:
162+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
163+
@echo
164+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
165+
166+
.PHONY: texinfo
167+
texinfo:
168+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
169+
@echo
170+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
171+
@echo "Run \`make' in that directory to run these through makeinfo" \
172+
"(use \`make info' here to do that automatically)."
173+
174+
.PHONY: info
175+
info:
176+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
177+
@echo "Running Texinfo files through makeinfo..."
178+
make -C $(BUILDDIR)/texinfo info
179+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
180+
181+
.PHONY: gettext
182+
gettext:
183+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
184+
@echo
185+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
186+
187+
.PHONY: changes
188+
changes:
189+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
190+
@echo
191+
@echo "The overview file is in $(BUILDDIR)/changes."
192+
193+
.PHONY: linkcheck
194+
linkcheck:
195+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
196+
@echo
197+
@echo "Link check complete; look for any errors in the above output " \
198+
"or in $(BUILDDIR)/linkcheck/output.txt."
199+
200+
.PHONY: doctest
201+
doctest:
202+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
203+
@echo "Testing of doctests in the sources finished, look at the " \
204+
"results in $(BUILDDIR)/doctest/output.txt."
205+
206+
.PHONY: coverage
207+
coverage:
208+
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
209+
@echo "Testing of coverage in the sources finished, look at the " \
210+
"results in $(BUILDDIR)/coverage/python.txt."
211+
212+
.PHONY: xml
213+
xml:
214+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
215+
@echo
216+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
217+
218+
.PHONY: pseudoxml
219+
pseudoxml:
220+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
221+
@echo
222+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
223+
224+
.PHONY: dummy
225+
dummy:
226+
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
227+
@echo
228+
@echo "Build finished. Dummy builder generates no files."

0 commit comments

Comments
 (0)