You are here

function Disqus::get_thread_posts in Disqus 7

Get a list of comments in a thread.

Both filter and exclude are multivalue arguments with coma as a divider. That makes is possible to use combined requests. For example, if you want to get all deleted spam messages, your filter argument should contain 'spam,killed' string. Note that values are joined by AND statement so 'spam,new' will return all messages that are new and marked as spam. It will not return messages that are new and not spam or that are spam but not new (i.e. has already been moderated).

Parameters

$thread_id: The ID of a thread belonging to the given forum

$limit:

  • limit: Number of entries that should be included in the response. Default is 25.
  • start: Starting point for the query. Default is 0.
  • filter: Type of entries that should be returned (new, spam or killed).
  • exclude: Type of entries that should be excluded from the response (new, spam or killed).

Return value

An array of hashes representing representing all posts belonging to the given forum.

File

./disqus.php, line 175
Provides the Disqus PHP API.

Class

Disqus
The Disqus PHP API.

Code

function get_thread_posts($thread_id, array $options = array()) {
  $options['thread_id'] = $thread_id;
  return $this
    ->call('get_thread_posts', $options);
}