Skip to content

SmsPoint/Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

com.nvt.celman

API for sms-send functions

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import com.nvt.celman

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import com.nvt.celman

Getting Started

Please follow the installation procedure and then run the following:

import time
import com.nvt.celman
from pprint import pprint
from com.nvt.celman.api import default_api
from com.nvt.celman.model.sms_send_request import SmsSendRequest
from com.nvt.celman.model.sms_send_response import SmsSendResponse
# Defining the host is optional and defaults to http://localhost:9003/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = com.nvt.celman.Configuration(
    host = "http://localhost:9003/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'


# Enter a context with an instance of the API client
with com.nvt.celman.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = default_api.DefaultApi(api_client)
    sms_send_request = SmsSendRequest(
        sender_name="sender_name_example",
        body="body_example",
        phone="phone_example",
        source="source_example",
    ) # SmsSendRequest | 

    try:
        # Send a text message request.
        api_response = api_instance.sms_send(sms_send_request)
        pprint(api_response)
    except com.nvt.celman.ApiException as e:
        print("Exception when calling DefaultApi->sms_send: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost:9003/api/v1

Class Method HTTP request Description
DefaultApi sms_send POST /sms/send Send a text message request.

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-Auth-Token
  • Location: HTTP header

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in com.nvt.celman.apis and com.nvt.celman.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from com.nvt.celman.api.default_api import DefaultApi
  • from com.nvt.celman.model.pet import Pet

Solution 1: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import com.nvt.celman
from com.nvt.celman.apis import *
from com.nvt.celman.models import *

About

Python API Client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published