public blocksDestroy ( string[optional] $userId = null, string[optional] $screenName = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array | ||
$userId | string[optional] | |
$screenName | string[optional] | |
$includeEntities | bool[optional] | |
$skipStatus | bool[optional] | |
return | array |
public function blocksDestroy($userId = null, $screenName = null, $includeEntities = null, $skipStatus = null)
{
// validate
if ($userId == '' && $screenName == '') {
throw new Exception('Specify an userId or a screenName.');
}
// build parameters
if ($userId != null) {
$parameters['user_id'] = (string) $userId;
}
if ($screenName != null) {
$parameters['screen_name'] = (string) $screenName;
}
if ($includeEntities !== null) {
$parameters['include_entities'] = $includeEntities ? 'true' : 'false';
}
// make the call
return $this->doCall('blocks/destroy.json', $parameters, true, 'POST');
}
/** * Tests Twitter->blocksCreate */ public function testBlocksDestroy() { $response = $this->twitter->blocksCreate(null, 'netlash'); $response = $this->twitter->blocksDestroy(null, 'netlash'); $this->isUser($response); }