$result = $client->removeDeviceAlias($REGISTRATION_ID1); echo '<b>removeDeviceAlias</b>' . $br; if ($result->isOk) { echo 'Remove Device Alias Success' . $br; } else { echo 'Remove Device Alias Fail' . $br; } echo $br; } catch (APIRequestException $e) { printAPIRequestErrorStack($e); } catch (APIConnectionException $e) { printAPIConnectionErrorStack($e); } try { //移除指定RegistrationId的所有tag $result = $client->removeDeviceTag($REGISTRATION_ID1); echo '<b>removeDeviceTag</b>' . $br; if ($result->isOk) { echo 'Remove Device Tag Success' . $br; } else { echo 'Remove Device Tag Fail' . $br; } echo $br; } catch (APIRequestException $e) { printAPIRequestErrorStack($e); } catch (APIConnectionException $e) { printAPIConnectionErrorStack($e); } try { //更新指定RegistrationId的指定属性,当前支持tags, alias $result = $client->updateDeviceTagAlias($REGISTRATION_ID1, $ALIAS1, array($TAG1, $TAG2), array($TAG3));
function testRemoveDeviceTag() { $client = new JPushClient($this->appKey, $this->masterSecret); $result = $client->removeDeviceTag($this->REGISTRATION_ID1); $this->assertTrue($result->isOk === true); }