summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2016-10-04 21:10:10 +0200
committermathieui <mathieui@mathieui.net>2016-10-04 21:10:10 +0200
commitf8cea760b661b6c995c73d6bee3e163d78d33353 (patch)
tree4d154c3979f75616c5a2ab359633fc637ba8d94f
parent5ef01ecdd1b3c8cfd912a135ccd85bcd8c3ff3f8 (diff)
downloadslixmpp-f8cea760b661b6c995c73d6bee3e163d78d33353.tar.gz
slixmpp-f8cea760b661b6c995c73d6bee3e163d78d33353.tar.bz2
slixmpp-f8cea760b661b6c995c73d6bee3e163d78d33353.tar.xz
slixmpp-f8cea760b661b6c995c73d6bee3e163d78d33353.zip
Fix the gmail_notify plugin
-rw-r--r--slixmpp/plugins/gmail_notify.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/slixmpp/plugins/gmail_notify.py b/slixmpp/plugins/gmail_notify.py
index 8071984c..f4cf188c 100644
--- a/slixmpp/plugins/gmail_notify.py
+++ b/slixmpp/plugins/gmail_notify.py
@@ -23,13 +23,13 @@ class GmailQuery(ElementBase):
plugin_attrib = 'gmail'
interfaces = set(('newer-than-time', 'newer-than-tid', 'q', 'search'))
- def getSearch(self):
+ def get_search(self):
return self['q']
- def setSearch(self, search):
+ def set_search(self, search):
self['q'] = search
- def delSearch(self):
+ def del_search(self):
del self['q']
@@ -40,17 +40,17 @@ class MailBox(ElementBase):
interfaces = set(('result-time', 'total-matched', 'total-estimate',
'url', 'threads', 'matched', 'estimate'))
- def getThreads(self):
+ def get_threads(self):
threads = []
for threadXML in self.xml.findall('{%s}%s' % (MailThread.namespace,
MailThread.name)):
threads.append(MailThread(xml=threadXML, parent=None))
return threads
- def getMatched(self):
+ def get_matched(self):
return self['total-matched']
- def getEstimate(self):
+ def get_estimate(self):
return self['total-estimate'] == '1'
@@ -62,7 +62,7 @@ class MailThread(ElementBase):
'senders', 'url', 'labels', 'subject', 'snippet'))
sub_interfaces = set(('labels', 'subject', 'snippet'))
- def getSenders(self):
+ def get_senders(self):
senders = []
sendersXML = self.xml.find('{%s}senders' % self.namespace)
if sendersXML is not None:
@@ -77,10 +77,10 @@ class MailSender(ElementBase):
plugin_attrib = 'sender'
interfaces = set(('address', 'name', 'originator', 'unread'))
- def getOriginator(self):
+ def get_originator(self):
return self.xml.attrib.get('originator', '0') == '1'
- def getUnread(self):
+ def get_unread(self):
return self.xml.attrib.get('unread', '0') == '1'