def me(self, network, name): am = AccountManager() account = am.get(network, name) controller = account.controller() print '{0} account {1} Me:'.format(network, name) user = controller.me() print user
def userTimeline(self, network, name, id, limit): am = AccountManager() account = am.get(network, name) controller = account.controller() print '{0} account {1} User Timeline:'.format(network, name) for note in controller.userTimeline(id, int(limit)): print note
def unlike(self, network, name, id): am = AccountManager() account = am.get(network, name) controller = account.controller() note = Note(id, None, None, None) res = controller.unlike(note) print '{0} account {1} Unlike: {2}'.format(network, name, 'Error' if not res else 'OK - ID: ' + note.id)
def post(self, network, name, message): am = AccountManager() account = am.get(network, name) controller = account.controller() note = Note(None, None, None, message) res = controller.post(note) print '{0} account {1} Post: {2}'.format(network, name, 'Error' if not res else 'OK - ID: ' + note.id)
def unblock(self, network, name, id): am = AccountManager() account = am.get(network, name) controller = account.controller() user = User(id) res = controller.unblock(user) print '{0} account {1} Unblock: {2}'.format(network, name, 'Error' if not res else 'OK - ID: @' + user.id)
def followers(self, network, name): am = AccountManager() account = am.get(network, name) controller = account.controller() print '{0} account {1} Followers:'.format(network, name) for user in controller.followers(): print user
def sentMessages(self, network, name): am = AccountManager() account = am.get(network, name) controller = account.controller() print '{0} account {1} Sent Messages:'.format(network, name) for message in controller.sentMessages(): print message
def user(self, network, name, id): am = AccountManager() account = am.get(network, name) controller = account.controller() print '{0} account {1} User:'.format(network, name) user = controller.user(id) print user
def sendMessage(self, network, name, id, msg): am = AccountManager() account = am.get(network, name) controller = account.controller() receiver = controller.user(id) message = Note(None, receiver, None, msg) res = controller.sendMessage(message) print '{0} account {1} Send Message: {2}'.format(network, name, 'Error' if not res else 'OK - ID: ' + message.id)