8000 adds more detail on search keywords · Stackdriver/twilio-python@dda8868 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 1, 2018. It is now read-only.

Commit dda8868

Browse files
author
Florian Le Goff
committed
adds more detail on search keywords
- small example of how to use ``country`` in a international phone number search - details of the other options from the search method, straight from the module's source code
1 parent ee4a3d2 commit dda8868

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/usage/phone-numbers.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,27 @@ You can use the ''*'' wildcard to match any character. The following example fin
5656
5757
numbers = client.phone_numbers.search(contains="D*D")
5858
59-
:meth:`PhoneNumbers.search` method has plenty of other options
60-
to augment your search. The `AvailablePhoneNumbers REST Resource
59+
60+
International Numbers
61+
^^^^^^^^^^^^^^^^^^^^^^^^^^
62+
63+
By default, Phone number search is looking for US-based numbers.
64+
Set :data:`country` keyword to your country code of choice to search for international numbers.
65+
66+
.. code-block:: python
67+
68+
numbers = client.phone_numbers.search(country="FR")
69+
70+
71+
:meth:`PhoneNumbers.search` method has plenty of other options to augment your search :
72+
73+
- :data:`region`: When searching the US, show numbers in this state
74+
- :data:`postal_code`: Only show numbers in this area code
75+
- :data:`rate_center`: US only.
76+
- :data:`near_lat_long`: Find close numbers within Distance miles.
77+
- :data:`distance`: Search radius for a Near- query in miles.
78+
79+
The `AvailablePhoneNumbers REST Resource
6180
<http://www.twilio.com/docs/api/rest/available-phone-numbers>`_ documentation
6281
also documents the various search options.
6382

0 commit comments

Comments
 (0)
0