How to use the jpush.device_regid function in jpush

To help you get started, we’ve selected a few jpush examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jpush / jpush-api-python-client / tests / devices / test_entity.py View on Github external
def test_compound_entity(self):
        self.assertEqual(
            jpush.device_tag(jpush.add("tag1", "tag2")),
            {'tags':{'add':['tag1', 'tag2']}})

        self.assertEqual(
            jpush.device_tag(jpush.remove("tag1", "tag2")),
            {'tags':{'remove':['tag1', 'tag2']}})

        self.assertEqual(
            jpush.device_alias(jpush.add("alias1", "alias2"), jpush.remove("alias3", "alias4")),
            {'alias':{'add':['alias1', 'alias2'], 'remove':['alias3', 'alias4']}})

        self.assertEqual(
            jpush.device_regid(jpush.add("regid1", "regid2"), jpush.remove("regid3", "regid4")),
            {'registration_ids':{'add':['regid1', 'regid2'], 'remove':['regid3', 'regid4']}})
github jpush / jpush-api-python-client / tests / devices / test_entity.py View on Github external
def test_basic_entity(self):
        entities = (
            (jpush.add, 'tag1', {'add': ['tag1']}),
            (jpush.remove, 'tag1', {'remove': ['tag1']}),
            (jpush.device_tag, 'tag1', {'tags': 'tag1'}),
            (jpush.device_alias, 'alias1', {'alias': 'alias1'}),
            (jpush.device_regid, 'registration_id1', {'registration_ids': 'registration_id1'}),
        )
        for entity, value, result in entities:
            self.assertEqual(entity(value), result)
github jpush / jpush-api-python-client / examples / device_examples / example_tagupduser.py View on Github external
import jpush as jpush
from conf import app_key, master_secret
_jpush = jpush.JPush(app_key, master_secret)
_jpush.set_logging("DEBUG")
device = _jpush.create_device()
tag = "ddd"
entity = jpush.device_regid(jpush.add("090c1f59f89"))
device.update_tagusers(tag, entity)
github jpush / jpush-api-python-client / examples / device_examples / example_tagupduser.py View on Github external
import jpush as jpush
from examples.conf import app_key, master_secret
_jpush = jpush.JPush(app_key, master_secret)
_jpush.set_logging("DEBUG")
device = _jpush.create_device()
tag = "ddd"
entity = jpush.device_regid(jpush.add("090c1f59f89"))
device.update_tagusers(tag, entity)