php-pushwoosh

A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.

View project onGitHub
Search

/setTags

Remote API Guide link
Method /setTags

Signature
SetTagsResponse setTags(SetTagsRequest $setTagsRequest)

<?php
use Gomoob\Pushwoosh\Model\Request\SetTagsRequest;

// Creates the request instance
$request = SetTagsRequest::create()
    ->setTags(
        array(
            'StringTag' => 'string value',
            'IntegerTag' => 'integer value',
            'ListTag' => ['string1', 'string2']
        )
    )
    ->setHwid('HWID');

// Call the '/setTags' Web Service
$response = $pushwoosh->setTags($request);

if($response->isOk()) {
    print 'Ok, operation successful.';
} else {
    print 'Oups, the operation failed :-('; 
    print 'Status code : ' . $response->getStatusCode();
    print 'Status message : ' . $response->getStatusMessage();
}
?>