| Package Data | |
|---|---|
| Maintainer Username: | escapeboy | 
| Maintainer Contact: | katsarov@gmail.com (Nikola Katsarov) | 
| Package Create Date: | 2014-04-13 | 
| Package Last Update: | 2014-06-24 | 
| Language: | PHP | 
| License: | MIT | 
| Last Refreshed: | 2025-10-25 15:01:16 | 
| Package Statistics | |
|---|---|
| Total Downloads: | 79 | 
| Monthly Downloads: | 0 | 
| Daily Downloads: | 0 | 
| Total Stars: | 3 | 
| Total Watchers: | 2 | 
| Total Forks: | 0 | 
| Total Open Issues: | 0 | 
Simple package to work with Disqus
With composer:
{
    ...
    "require": {
        "escapeboy/disqus": "dev-master"
    }
}
Register in app/config/app.php
'providers' => array(
    'Escapeboy\Disqus\DisqusServiceProvider',
)
Publish configuration file
php artisan config:publish escapeboy/disqus
In app/config/packages/escapeboy/disqus/config.php edit configuration file:
return array(
		'api_key' => '', // your disqus api key
		'api_secret' => '', // your disqus secret
		'api_version' => '3.0', // disqus API version used. Do not change it
		'cache_time' => 60, // cache time in minutes used to cache results
		'forum'	=> '' // your disqus forum (shortname)
	);
For example we want to get from API info for some thread We want section "thread", sub-section "details". And we provide "thread:link" (can use "thread:ident" or "thread") It will return json. More info here: http://disqus.com/api/docs/threads/details/
// Disqus::get($section, $method, $params=array()
$thread = Disqus::get('threads', 'details', array('thread:link' => 'http://thread_url'));
Sending data to Disqus
Disqus::post('posts', 'create', array('message' => 'Yo! Nice thread!', 'thread' => 12));
$comment_count = Disqus::commentsCount('http://thread_url'); // returns integer of comments count for given url
... more functions comming in next releases