TijsVerkoyen\Twitter\Twitter::statusesDestroy PHP 메소드

statusesDestroy() 공개 메소드

Destroys the status specified by the required ID parameter. The authenticating user must be the author of the specified status. Returns the destroyed status if successful.
public statusesDestroy ( string $id, bool[optional] $trimUser = null ) : array
$id string The numerical ID of the desired status.
$trimUser bool[optional]
리턴 array
    public function statusesDestroy($id, $trimUser = null)
    {
        // build parameters
        $parameters = null;
        if ($trimUser !== null) {
            $parameters['trim_user'] = $trimUser ? 'true' : 'false';
        }
        // make the call
        return $this->doCall('statuses/destroy/' . (string) $id . '.json', $parameters, true, 'POST');
    }

Usage Example

예제 #1
0
 /**
  * Tests Twitter->statusesRetweet()
  */
 public function testStatusesRetweet()
 {
     $response = $this->twitter->statusesRetweet('241259202004267009');
     $this->isTweet($response);
     $this->twitter->statusesDestroy($response['id']);
 }
Twitter