Citcall REST API for Python
Project description
citcall-python
Citcall REST API for Python. API support for Synchchronous Miscall, Asynchronous miscall, and SMS.
This is the Python3 client library for use Citcall's API. To use this, you'll need a Citcall account and Your IP has been filtered in citcall system. See citcall documentation for more information. This is currently a beta release.
Instalation
Install Using PIP
pip install citcall-devel
Install Source from GitHub
$ git clone git://github.com/citcall/citcall-python.git
Remember to note that the citcall folder is a package.
Usage
from citcall import Citcall
Create Object
account = Citcall(userid="Your userid", apikey="Your apikey")
OR
import citcall
Create Object
account = citcall.Citcall(userid="Your userid", apikey="Your apikey")
Example
Miscall OTP
To use Citcall's Miscall Async API to Asynchronous miscall, call the account.async_miscall()
method.
The API can be called directly, using keyword argument, the keys match the parameters of the API.
motp = account.async_miscall(msisdn="msisdn", gateway=gateway)
If you want to able to do verify later use this example.
motp = account.async_miscall(msisdn="msisdn", gateway=gateway, valid_time=valid_time, limit_try=limit_try)
Sync
motp = account.sync_miscall(msisdn="msisdn", gateway=gateway)
motp = account.sync_miscall(msisdn="msisdn", gateway=gateway, valid_time=valid_time, limit_try=limit_try)
The API response data can be accessed as dictonary
print(motp)
SMS
To use Citcall's SMS API to send an SMS message, call the citcall.sms()
method.
The API can be called directly, using using keyword argument, the keys match the parameters of the API.
sms = account.sms(senderid="citcall", msisdn="msisdn", text="Hello World!")
The API response data can be accessed as dictonary
print(sms)
Contribute
- Check for open issues or open a new issue for a feature request or a bug
- Fork the repository on Github to start making your changes to the
master
branch (or branch off of it) - Write a test which shows that the bug was fixed or that the feature works as expected
- Send a pull request and bug us until We merge it
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file citcall-devel-0.4.tar.gz
.
File metadata
- Download URL: citcall-devel-0.4.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42b011b66413db536df97973a2148228dab4ffd84e2bc7505e4b7e40d07be8df |
|
MD5 | 7e1fe539ba22d230ff49763be950d915 |
|
BLAKE2b-256 | bd2c85d09eb35c38cd828ee59036ebf0ef8ab4e2f4b23891c5c0b6260544c746 |
File details
Details for the file citcall_devel-0.4-py3-none-any.whl
.
File metadata
- Download URL: citcall_devel-0.4-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f27431d66dd9b06e27ea4ca3af815bfc1e5a5ca8ce07a8f18e5186a0b6763547 |
|
MD5 | 1a81313de67ceeeb1e4b2b5d6bc1708f |
|
BLAKE2b-256 | 23c38cf38be3738a36714940c0a32a5f6fcce89974abec77ff5d9294d2c802f0 |