Example #1
0
def pushList(args):
    p = PushBullet(args.api_key)
    lst = p.pushList(args.device, args.title, args.list)
    if args.json:
        print(json.dumps(lst))
        return
    if args.device and args.device[0] == '#':
        print("List broadcast to channel %s" % (args.device))
    elif not args.device:
        print("List %s sent to all devices" % (lst["iden"]))
    else:
        print("List %s sent to %s" % (lst["iden"], lst["target_device_iden"]))