Browse Source

code clean

vnc-console 1 year ago
parent
commit
3f3bac892e
1 changed files with 6 additions and 14 deletions
  1. 6 14
      winmentor/smslink.py

+ 6 - 14
winmentor/smslink.py

@@ -6,6 +6,10 @@ import requests
 class Smslink():
     #  HTTPS API Endpoint:  https://secure.smslink.ro/sms/gateway/communicate/index.php
     #  HTTP API Endpoint:   http://www.smslink.ro/sms/gateway/communicate/index.php
+        #
+        #  Get your SMSLink / SMS Gateway Connection ID and Password from 
+        #  https://www.smslink.ro/get-api-key/
+        #
     URL = 'https://secure.smslink.ro/sms/gateway/communicate/index.php'
     HEADERS= {}
     def __init__(self, connectionid: str, password: str, to: str=None, querystring: str=None):
@@ -45,26 +49,14 @@ class Smslink():
         self._message = value
         self._querystring['message'] = self._message
         return self._message
-        
-        # url = 'https://secure.smslink.ro/sms/gateway/communicate/index.php'
-        
-        #
-        #  Get your SMSLink / SMS Gateway Connection ID and Password from 
-        #  https://www.smslink.ro/get-api-key/
-        #
     
     def send(self):
         # self._message = message
         return requests.get(self.URL, headers=self.HEADERS, params=self._querystring)
-        
-    
-    # def bulksend(self, message, numbers: list):
-    #     for number in numbers:
-    #         self._to = number
-    #         self.send()
+
 
 if __name__ == '__main__':
-    sms = Smslink('yourid', 'yourpassword')
+    sms = Smslink('yourconnectionid', 'yourpassword')
     sms.message = 'My Test Message\n2nd row'
     print(sms._querystring)
     resp = sms.send()