-
Notifications
You must be signed in to change notification settings - Fork 2
/
phenny_typepad.py
27 lines (22 loc) · 923 Bytes
/
phenny_typepad.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import typepad
def f_tpuser(phenny, input):
typepad.client.batch_request()
u = typepad.User.get_by_url_id(input.group(2))
typepad.client.complete_batch()
phenny.say("%s's about me: %s" % (input.group(2), u.about_me))
f_tpuser.commands = ['tpuser']
def f_tpelsewhere(phenny, input):
typepad.client.batch_request()
u = typepad.User.get_by_url_id(input.group(2))
typepad.client.complete_batch()
for account in u.elsewhere_accounts:
if account.provider_name:
if account.username:
phenny.say('%s at %s (%s)' % (account.username, account.provider_name, account.url))
else:
phenny.say( '%s at %s (%s)' % (account.user_id, account.provider_name, account.url))
elif account.url:
phenny.say( account.url)
f_tpelsewhere.commands = ['tpelsewhere']
def setup(self):
typepad.TypePadObject.batch_requests = False