Closed ghost closed 5 years ago
What about just putting one registration id in the list?
subscribe_registration_ids_to_topic(self, [registration_id], topic_name)
like this?:
mylist = []
mylist.append('some token')
subscribe_registration_ids_to_topic(mylist, 'topic')
I think we should add subscribe_registration_id_to_topic('my key', 'mytopic')
You don't have to create a new list and append items to it. You can do it easily in one line:
subscribe_registration_ids_to_topic(self, ["some token"], "mytopic")
Thanks for the proposal. I don't think that a method subscribe_registration_id_to_topic
is really required, because it just makes the library harder to maintain and adding the brackets around the token is not that much work.
As I can see here, we can subscribe a list of tokens to a topic! https://github.com/olucurious/PyFCM/blob/master/pyfcm/baseapi.py#L269 But how to subscribe only one token to one topic?