コード例 #1
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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
コード例 #2
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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
コード例 #3
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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)
コード例 #4
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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)
コード例 #5
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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)
コード例 #6
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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
コード例 #7
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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
コード例 #8
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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
コード例 #9
0
ファイル: commandline.py プロジェクト: j2sg/woody
    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)