Skip to main content

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

  1. Check for open issues or open a new issue for a feature request or a bug
  2. Fork the repository on Github to start making your changes to the master branch (or branch off of it)
  3. Write a test which shows that the bug was fixed or that the feature works as expected
  4. Send a pull request and bug us until We merge it

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

citcall-devel-0.4.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

citcall_devel-0.4-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page