php-pushwoosh

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

View project onGitHub
Search

/unregisterDevice

Remote API Guide link
Method /unregisterDevice

Signature
UnregisterDeviceResponse unregisterDevice(UnregisterDeviceRequest $unregisterDeviceRequest)

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

// Creates the request instance
$request = UnregisterDeviceRequest::create()->setHwid('HWID');

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

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