Example #1
0
 /**
  * Method to retrieve the most recent direct messages sent from the
  * authenticated user
  *
  * @param Array $options
  *   - since_id int returns results with an ID more recent than the provided ID
  *   - max_id int returns results with an ID older than the provided ID
  *   - count int number of results to return, up to 200, if omitted returns 20
  *   - include_entities boolean entities node will be excluded when set to false
  *   - page int the page of results to retrieve
  * @return string
  */
 public function retrieveLatestSentMessages(array $options = [])
 {
     $availableOptions = ['since_id', 'max_id', 'count', 'include_entities', 'page'];
     $options = $this->filterOptions($availableOptions, $options);
     return $this->client->makeGetRequest(self::RETRIEVE_SENT_MESSAGES_ENDPOINT, $options);
 }
Example #2
0
 /**
  * Method for deleting a tweet that you've previously published
  *
  * @param int $id id for the tweet to be deleted
  * @param Array $options Optional parameters for the request
  *   - trim_user boolean when true returns the user object with only an ID
  */
 public function delete($id, $options = [])
 {
     $availableOptions = ['trim_user'];
     $options = $this->filterOptions($availableOptions, $options);
     return $this->client->makePostRequest(self::DELETE_TWEET_ENDPOINT . $id . '.json', $options);
 }