Ejemplo n.º 1
0
	def __init__(self, auth):
		if(auth['type'] == config.GV):
			self.client = GoogleVoice(auth['username'], auth['password'], d = False)
		elif(auth['type'] == config.AT):
			self.client = AfricaTalking(auth['username'], auth['api_key'])
		else:
			raise NotImplementedError(transport + " not implemented")
Ejemplo n.º 2
0
class VoiceXTransport:
	def __init__(self, auth):
		if(auth['type'] == config.GV):
			self.client = GoogleVoice(auth['username'], auth['password'], d = False)
		elif(auth['type'] == config.AT):
			self.client = AfricaTalking(auth['username'], auth['api_key'])
		else:
			raise NotImplementedError(transport + " not implemented")

	def set_callback(self, callback):
		self.client.set_callback(callback)

	def sms(self, to, text):
		self.client.sms(to, text)

	def mark_read(self, msg):
		self.client.mark_read(msg)

	def mark_unread(self, msg):
		self.client.mark_unread(msg)

	def delete(self, msg):
		self.client.delete(msg)

	def fetch_unread_sms():
		self.client.fetch_unread_sms()

	def fetch_all_sms(self):
		self.client.fetch_all_sms()