GreyDot Package

Submodules

greydot.signup module

This function allows you to sign up new customers directly. If you enable notify by email, you will also receive an email every time the url is called with your APP Key.

URL : https://greydotapi.me/?k=[APP Key]&do=[FID] &par1=[First Name]&par2=[Last Name]&par3=[Email] &par4=[Mobile]&par5=[ReferralCode]&par6=[GroupCode] &par7=[WelcomeEmail]&par8=[WelcomeSMS]

APP Key : Your APP Key FID]The function ID for Signup is 19 **First Name : First name of the customer being signed up _required_ Last Name : Last name of the customer being signed up _optional_ Email : Email of the customer being signed up _optional_ Mobile : Mobile number of the customer being signed up _required_ ReferralCode : Your ReferralCode _optional_ GroupCode : Your GroupCode if you have one _optional_ WelcomeEmail : If set to 1 customer being signed up will get a email with his account info_optional_ WelcomeSMS : If set to 1 customer being signed up will get an sms with his account info _optional_

If par7 and par8 is set to 0 or not specified the customer being signed up will get no welcome correspondence.

Example 1 url : https://greydotapi.me/?k=abcdefghijklmnopqrst&do=19&par1=Joe&par2=Black&par3=joe@email.me&par4=0898887744&par5=1234

Example reply :

{
“query”: {
“query_result”: {
“status”: “Success”, “function”: “SignUp”, “signup_status”: “Registered”, “identity”: “0123456789”, “password”: “9876543210”, “appkey”: “abcdefghijklmnopqrst”

}, “query_status”: “DONE”, “query_code”: “D0017”

}

}

greydot.signup.register(fname: str, mobile: str, lname=None, email=None, refcode='', groupcode=None, welcomemail=0, welcomesms=1)[source]

Params:

**fname** : First name of the customer being signed up _required_
**lname** : Last name of the customer being signed up _optional_
**email** : Email of the customer being signed up _optional_
**mobile** : Mobile number of the customer being signed up _required_
**refcode** : Your ReferralCode _optional_
**groupcode** : Your GroupCode if you have one _optional_
**welcomemail** : If set to 1 customer being signed up will get a email with his account info _optional_
**welcomesms** : If set to 1 customer being signed up will get an sms with his account info _optional_

greydot.b2c module

This function allows you to transfer from your wallet to other identities. If you enable notify by email, you will receive an email every time the url is called with your APP Key.

URL : https://greydotapi.me/?par2=[Amount]&par1=[Send to Identity]&k=[APP Key]&do=[FID]

[Amount] is the amount to send [Send to Identity] the identity that will recieve the digits [APP Key] Your APP Key [FID]The function ID for Wallet transfer is 2

Example url : https://greydotapi.me/?par2=1&par1=25911000000&k=abcdefghijklmnopqrst&do=2

Example reply :

{
“query”: {
“query_result”: {
“status”: “Success”, “function”: “Wallet transfer”, “amount”: “1”, “to”: “25911000000”

}, “query_status”: “DONE”, “query_code”: “D0002”

}

}

greydot.b2c.send_money(Amount=0.0, To='')[source]

greydot.sms module

Use the API to send an sms to a number. If you enable notify by email, you will receive an email every time the url is called with your APP Key.

URL : https://greydotapi.me/?par1=[Number-to-SMS]&par2=[url-encoded-text-message]&k=[APP-Key]&do=[FID]

[Number to SMS] Number that will receive the sms message or list of numbers each separated by an e

[url encoded text message] Text to be sent to number in url encoded form

[APP Key] Your APP Key

[FID] The function ID for Send sms is 11

Bulk Example url : https://greydotapi.me/?par1=0820000000e0820000001e0820000002&par2=Test+sms%2C+Hallo+world.&k=abcdefghijklmnopqrst&do=11

Example url : https://greydotapi.me/?par1=0820000000&par2=Test+sms%2C+Hallo+world.&k=abcdefghijklmnopqrst&do=11

Example reply :

{
“query”: {
“query_result”: {
“status”: [
“Success”, “Send_SMS”

], “to”: “27110000000”, “sms_id”: “000”

}, “query_status”: “DONE”, “query_code”: “D0011”

}

}

greydot.sms.parse_xml_response(response)[source]

Args:

- `response`: String of raw xml response returned

Returns:

>
{
‘result_status’:”Success”, ‘to’:‘27110000000’, ‘sms_id’:‘0001’, ‘query_status’:’DONE’, ‘query_code’:’D0011’

}

greydot.sms.send_sms(recipients=[], message='Test Message')[source]

Args:

- `recipients`: Number that will receive the sms message or list of numbers
  • message: Text to be sent to number

Returns:

>
{
‘result_status’:”Success”, ‘to’:‘27110000000’, ‘sms_id’:‘0001’, ‘query_status’:’DONE’, ‘query_code’:’D0011’

}

greydot.airtime module

This function allows you to query your Airtime balance. If you enable notify by email, you will receive an email every time the url is called with your APP Key.

URL : https://greydotapi.me/?k=[APP Key]&do=[FID]

[APP Key] Your APP Key

[FID]The function ID for Airtime balance is 5

Example url : https://greydotapi.me/?k=abcdefghijklmnopqrst&do=5

Example reply :

{
“query”: {
“query_result”: {
“status”: “Success”, “function”: “Airtime balance”, “amount”: “20.00”

}, “query_status”: “DONE”, “query_code”: “D0005”

}

}

greydot.wallet module

This function allows you to query your Wallet balance. If you enable notify by email, you will receive an email every time the url is called with your APP Key.

URL : https://greydotapi.me/?k=[APP Key]&do=[FID]

[APP Key] Your APP Key

[FID]The function ID for Wallet balance is 2

Example url : https://greydotapi.me/?k=abcdefghijklmnopqrst&do=2

Example reply :

<?xml version=”1.0” encoding=”utf-8” ?>

<query>

<query_result>

<status>Success</status>

<function>Digit balance</function>

<amount>10.00</amount>

</query_result>

<query_status>DONE</query_status>

<query_code>D0003</query_code>

Module contents