Skip to content

Commit 78cdc08

Browse files
authored
Add supported API's & rmv old method references
1 parent 2245753 commit 78cdc08

File tree

1 file changed

+36
-93
lines changed

1 file changed

+36
-93
lines changed

README.md

Lines changed: 36 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ need a Nexmo account. Sign up [for free at nexmo.com][signup].
2020
* [Managing Secrets](#managing-secrets)
2121
* [Application API](#application-api)
2222
* [Overriding API Attributes](#overriding-api-attributes)
23+
* [Frequently Asked Questions](#frecuently-asked-questions)
2324
* [License](#license)
2425

2526

@@ -69,9 +70,9 @@ environment variable).
6970

7071
## SMS API
7172

72-
## SMS Class
73+
### SMS Class
7374

74-
### Creating an instance of the SMS class
75+
#### Creating an instance of the SMS class
7576

7677
To create an instance of the SMS class follow these steps:
7778

@@ -101,20 +102,6 @@ sms = Sms(client)
101102

102103
### Send an SMS
103104

104-
```python
105-
responseData = client.send_message(
106-
{
107-
"from": NEXMO_BRAND_NAME,
108-
"to": TO_NUMBER,
109-
"text": "A text message sent using the Nexmo SMS API",
110-
}
111-
)
112-
```
113-
114-
Reference: [Send sms](https://developer.nexmo.com/messaging/sms/code-snippets/send-an-sms)
115-
116-
**Using the Sms class**
117-
118105
```python
119106
from nexmo import Sms
120107
sms = Sms(key=NEXMO_API_KEY, secret=NEXMO_API_SECRET)
@@ -137,6 +124,7 @@ responseData = client.send_message({
137124
})
138125
```
139126

127+
Reference: [Send sms with unicode](https://developer.nexmo.com/messaging/sms/code-snippets/send-an-sms-with-unicode)
140128

141129
**Using Sms Class**
142130

@@ -173,17 +161,6 @@ sms.submit_sms_conversion(response['message-id'])
173161

174162
### Make a call
175163

176-
```python
177-
response = client.create_call({
178-
'to': [{'type': 'phone', 'number': '14843331234'}],
179-
'from': {'type': 'phone', 'number': '14843335555'},
180-
'answer_url': ['https://example.com/answer']
181-
})
182-
```
183-
184-
Docs: [https://developer.nexmo.com/api/voice#createCall](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#createCall)
185-
186-
**with voice class**
187164

188165
```python
189166
from nexmo import Client, Voice
@@ -196,33 +173,20 @@ voice.create_all({
196173
})
197174
```
198175

176+
Testing screenshots:[create call](https://gitlab.com/codeonrocks/client/nexmo-python/uploads/fc104415f55a4ad22ecf8defd90b926b/NexmoVoiceUsage.PNG)
199177

200178
### Retrieve a list of calls
201179

202-
```python
203-
response = client.get_calls()
204-
```
205-
206-
Docs: [https://developer.nexmo.com/api/voice#getCalls](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#getCalls)
207-
208-
**with voice class**
209-
210180
```python
211181
from nexmo import Client, Voice
212182
client = Client(application_id=APPLICATION_ID, private_key=PRIVATE_KEY)
213183
voice = Voice(client)
214184
voice.get_calls()
215185
```
216186

217-
### Retrieve a single call
218-
219-
```python
220-
response = client.get_call(uuid)
221-
```
222187

223-
Docs: [https://developer.nexmo.com/api/voice#getCall](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#getCall)
188+
### Retrieve a single call
224189

225-
**with voice class**
226190

227191
```python
228192
from nexmo import Client, Voice
@@ -231,15 +195,8 @@ voice = Voice(client)
231195
voice.get_call(uuid)
232196
```
233197

234-
### Update a call
235-
236-
```python
237-
response = client.update_call(uuid, action='hangup')
238-
```
239-
240-
Docs: [https://developer.nexmo.com/api/voice#updateCall](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#updateCall)
241198

242-
**with voice class**
199+
### Update a call
243200

244201
```python
245202
from nexmo import Client, Voice
@@ -253,17 +210,8 @@ response = voice.create_all({
253210
voice.update_call(response['uuid'], action='hangup')
254211
```
255212

256-
### Stream audio to a call
257-
258-
```python
259-
stream_url = 'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'
260213

261-
response = client.send_audio(uuid, stream_url=[stream_url])
262-
```
263-
264-
Docs: [https://developer.nexmo.com/api/voice#startStream](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#startStream)
265-
266-
**with voice class**
214+
### Stream audio to a call
267215

268216
```python
269217
from nexmo import Client, Voice
@@ -278,15 +226,8 @@ response = voice.create_call({
278226
voice.send_audio(response['uuid'],stream_url=[stream_url])
279227
```
280228

281-
### Stop streaming audio to a call
282-
283-
```python
284-
response = client.stop_audio(uuid)
285-
```
286229

287-
Docs: [https://developer.nexmo.com/api/voice#stopStream](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#stopStream)
288-
289-
**Using voice class**
230+
### Stop streaming audio to a call
290231

291232
```python
292233
from nexmo import Client, Voice
@@ -302,15 +243,8 @@ voice.send_audio(response['uuid'],stream_url=[stream_url])
302243
voice.stop_audio(response['uuid'])
303244
```
304245

305-
### Send a synthesized speech message to a call
306-
307-
```python
308-
response = client.send_speech(uuid, text='Hello')
309-
```
310-
311-
Docs: [https://developer.nexmo.com/api/voice#startTalk](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#startTalk)
312246

313-
**Using voice class**
247+
### Send a synthesized speech message to a call
314248

315249
```python
316250
from nexmo import Client, Voice
@@ -324,17 +258,8 @@ response = voice.create_call({
324258
voice.send_speech(response['uuid'], text='Hello from nexmo')
325259
```
326260

327-
328261
### Stop sending a synthesized speech message to a call
329262

330-
```python
331-
response = client.stop_speech(uuid)
332-
```
333-
334-
Docs: [https://developer.nexmo.com/api/voice#stopTalk](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#stopTalk)
335-
336-
**Using voice class**
337-
338263
```python
339264
>>> from nexmo import Client, Voice
340265
>>> client = Client(application_id=APPLICATION_ID, private_key=APPLICATION_ID)
@@ -350,13 +275,6 @@ Docs: [https://developer.nexmo.com/api/voice#stopTalk](https://developer.nexmo.c
350275

351276
### Send DTMF tones to a call
352277

353-
```python
354-
response = client.send_dtmf(uuid, digits='1234')
355-
```
356-
357-
Docs: [https://developer.nexmo.com/api/voice#startDTMF](https://developer.nexmo.com/api/voice?utm_source=DEV_REL&utm_medium=github&utm_campaign=python-client-library#startDTMF)
358-
359-
**Using voice class**
360278

361279
```python
362280
from nexmo import Client, Voice
@@ -370,7 +288,6 @@ response = voice.create_call({
370288
voice.send_dtmf(response['uuid'], digits='1234')
371289
```
372290

373-
374291
### Get recording
375292

376293
```python
@@ -584,6 +501,32 @@ print(client.api_host()) # returns api.nexmo.com
584501
client.api_host('myapi.nexmo.com') # rewrite the value of api_host
585502
```
586503

504+
## Frequently Asked Questions
505+
506+
### Supported APIs
507+
508+
The following is a list of Vonage APIs and whether the Python SDK provides support for them:
509+
510+
| API | API Release Status | Supported?
511+
|----------|:---------:|:-------------:|
512+
| Account API | General Availability ||
513+
| Alerts API | General Availability ||
514+
| Application API | General Availability ||
515+
| Audit API | Beta ||
516+
| Conversation API | Beta ||
517+
| Dispatch API | Beta ||
518+
| External Accounts API | Beta ||
519+
| Media API | Beta ||
520+
| Messages API | Beta ||
521+
| Number Insight API | General Availability ||
522+
| Number Management API | General Availability ||
523+
| Pricing API | General Availability ||
524+
| Redact API | General Availability ||
525+
| Reports API | Beta ||
526+
| SMS API | General Availability ||
527+
| Verify API | General Availability ||
528+
| Voice API | General Availability ||
529+
587530
## Contributing
588531

589532
We :heart: contributions! But if you plan to work on something big or controversial, please [contact us](mailto:[email protected]) first!

0 commit comments

Comments
 (0)