예제 #1
0
def example_untag2():
    """Alternatively you can remove a tag by passing values defined by you."""

    # Define app_id and secret
    my_app_id = 'my_app_id'
    my_secret = 'my_secret'
    # Create a Pushbots instance
    pushbots = Pushbots(app_id=my_app_id, secret=my_secret)
    # Define data
    data = {'platform': Pushbots.PLATFORM_ANDROID,
            'alias': 'alias_to_remove_tag', 'tag': 'tag_to_be_removed'}
    code, message = pushbots.untag(data=data)
    print('Returned code: {0}'.format(code))
    print('Returned message: {0}'.format(message))
예제 #2
0
def example_untag1():
    """Remove tag by passing values directly to Pushbots.untag()"""

    # Define app_id and secret
    my_app_id = 'my_app_id'
    my_secret = 'my_secret'
    # Create a Pushbots instance
    pushbots = Pushbots(app_id=my_app_id, secret=my_secret)
    # Define alias, tag and platform
    alias = 'alias_to_remove_tag'
    tag = 'tag_to_be_removed'
    platform = Pushbots.PLATFORM_ANDROID
    code, message = pushbots.untag(platform=platform, alias=alias, tag=tag)
    print('Returned code: {0}'.format(code))
    print('Returned message: {0}'.format(message))
예제 #3
0
def example_untag1():
    """Remove tag by passing values directly to Pushbots.untag()"""

    # Define app_id and secret
    my_app_id = 'my_app_id'
    my_secret = 'my_secret'
    # Create a Pushbots instance
    pushbots = Pushbots(app_id=my_app_id, secret=my_secret)
    # Define alias, tag and platform
    alias = 'alias_to_remove_tag'
    tag = 'tag_to_be_removed'
    platform = Pushbots.PLATFORM_ANDROID
    code, message = pushbots.untag(platform=platform, alias=alias, tag=tag)
    print('Returned code: {0}'.format(code))
    print('Returned message: {0}'.format(message))
예제 #4
0
def example_untag2():
    """Alternatively you can remove a tag by passing values defined by you."""

    # Define app_id and secret
    my_app_id = 'my_app_id'
    my_secret = 'my_secret'
    # Create a Pushbots instance
    pushbots = Pushbots(app_id=my_app_id, secret=my_secret)
    # Define data
    data = {
        'platform': Pushbots.PLATFORM_ANDROID,
        'alias': 'alias_to_remove_tag',
        'tag': 'tag_to_be_removed'
    }
    code, message = pushbots.untag(data=data)
    print('Returned code: {0}'.format(code))
    print('Returned message: {0}'.format(message))