initial commit
This commit is contained in:
commit
0f526a5543
|
@ -0,0 +1,3 @@
|
|||
ACCOUNT_SID = "your-sid-here"
|
||||
AUTH_TOKEN = "your-auth-token-here"
|
||||
FROM_NUMBER = "your-number"
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
import config
|
||||
from twilio.rest import TwilioRestClient
|
||||
|
||||
class LibSMSCast:
|
||||
|
||||
def __init__(self):
|
||||
self.client = TwilioRestClient(config.ACCOUNT_SID, config.AUTH_TOKEN)
|
||||
|
||||
def send(to, msg):
|
||||
for recipient in to:
|
||||
self.client.messages.create(
|
||||
to=recipient,
|
||||
from_=config.FROM_NUMBER,
|
||||
body=msg,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue