Can't push a notification in a pushbullet channel using the pushbullet API

168 Views Asked by At

I've tried something like this:

from pushbullet import PushBullet

API_KEY = myAPIKey

pb = PushBullet(myAPIKey)

push = pb.push_note('Title', 'Desc', channel="myTag")

I've already created a channel (with the relative tag). This code produces the output

data["channel_tag"] = channel.channel_tag; AttributeError: 'str' object has no attribute 'channel_tag'

What am I doing wrong?

1

There are 1 best solutions below

1
Mm2608 On
print(pb.channels)
push = pb.push_note('test', 'test', channel=pb.channels[channel_index])