echo '<b>deleteTag</b>' . $br; if ($result->isOk) { echo 'Delete Tag Success' . $br; } else { echo 'Delete Tag Fail' . $br; } echo $br; } catch (APIRequestException $e) { printAPIRequestErrorStack($e); } catch (APIConnectionException $e) { printAPIConnectionErrorStack($e); } /*----Alias Example----*/ try { //删除指定alias,以及该alias与用户的绑定关系 $result = $client->getAliasDevices($ALIAS1, array('ios', 'android')); $payload = $result->body; echo '<b>getAliasDevices</b>' . $br; echo 'Registration_ids:' . json_encode($payload['registration_ids']) . $br; echo $br; } catch (APIRequestException $e) { printAPIRequestErrorStack($e); } catch (APIConnectionException $e) { printAPIConnectionErrorStack($e); } try { $result = $client->deleteAlias($ALIAS2); echo '<b>deleteAlias</b>' . $br; if ($result->isOk) { echo 'Delete Alias Success' . $br; } else {
function testGetAliasDevices2() { $client = new JPushClient($this->appKey, $this->masterSecret); $result = $client->getAliasDevices($this->ALIAS1, array('ios', 'android')); $this->assertTrue($result->isOk === true); }