Skip to content

Latest commit

 

History

History
180 lines (128 loc) · 5.8 KB

File metadata and controls

180 lines (128 loc) · 5.8 KB

clicksend_client.NumberApi

All URIs are relative to https://rest.clicksend.com/v3

Method HTTP request Description
numbers_buy_by_dedicated_number_post POST /numbers/buy/{dedicated_number} Buy dedicated number
numbers_get GET /numbers Get all availible dedicated numbers
numbers_search_by_country_get GET /numbers/search/{country} Get all dedicated numbers by country

numbers_buy_by_dedicated_number_post

str numbers_buy_by_dedicated_number_post(dedicated_number)

Buy dedicated number

Buy dedicated number

Example

from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = clicksend_client.NumberApi(clicksend_client.ApiClient(configuration))
dedicated_number = 'dedicated_number_example' # str | Phone number to purchase

try:
    # Buy dedicated number
    api_response = api_instance.numbers_buy_by_dedicated_number_post(dedicated_number)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NumberApi->numbers_buy_by_dedicated_number_post: %s\n" % e)

Parameters

Name Type Description Notes
dedicated_number str Phone number to purchase

Return type

str

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

numbers_get

str numbers_get(page=page, limit=limit)

Get all availible dedicated numbers

Get all availible dedicated numbers

Example

from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = clicksend_client.NumberApi(clicksend_client.ApiClient(configuration))
page = 1 # int | Page number (optional) (default to 1)
limit = 10 # int | Number of records per page (optional) (default to 10)

try:
    # Get all availible dedicated numbers
    api_response = api_instance.numbers_get(page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NumberApi->numbers_get: %s\n" % e)

Parameters

Name Type Description Notes
page int Page number [optional] [default to 1]
limit int Number of records per page [optional] [default to 10]

Return type

str

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

numbers_search_by_country_get

str numbers_search_by_country_get(country, search=search, search_type=search_type, page=page, limit=limit)

Get all dedicated numbers by country

Get all dedicated numbers by country

Example

from __future__ import print_function
import time
import clicksend_client
from clicksend_client.rest import ApiException
from pprint import pprint

# Configure HTTP basic authorization: BasicAuth
configuration = clicksend_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

# create an instance of the API class
api_instance = clicksend_client.NumberApi(clicksend_client.ApiClient(configuration))
country = 'country_example' # str | Country code to search
search = 'search_example' # str | Your search pattern or query. (optional)
search_type = 56 # int | Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with. (optional)
page = 1 # int | Page number (optional) (default to 1)
limit = 10 # int | Number of records per page (optional) (default to 10)

try:
    # Get all dedicated numbers by country
    api_response = api_instance.numbers_search_by_country_get(country, search=search, search_type=search_type, page=page, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NumberApi->numbers_search_by_country_get: %s\n" % e)

Parameters

Name Type Description Notes
country str Country code to search
search str Your search pattern or query. [optional]
search_type int Your strategy for searching, 0 = starts with, 1 = anywhere, 2 = ends with. [optional]
page int Page number [optional] [default to 1]
limit int Number of records per page [optional] [default to 10]

Return type

str

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]