https://github.com/compwright/disguz
An unofficial Disqus API client for PHP based on Guzzle
https://github.com/compwright/disguz
Last synced: about 2 months ago
JSON representation
An unofficial Disqus API client for PHP based on Guzzle
- Host: GitHub
- URL: https://github.com/compwright/disguz
- Owner: compwright
- License: mit
- Created: 2014-10-01T05:07:45.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-18T23:11:01.000Z (about 11 years ago)
- Last Synced: 2025-05-22T09:40:32.995Z (7 months ago)
- Language: PHP
- Size: 166 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Disguz
An unofficial Disqus API client based on the [Guzzle 3](http://guzzle3.readthedocs.org/en/latest/index.html) PHP library.
## Usage
Get a Disguz instance by calling the factory method. Pass in an array of configuration settings:
```php
$config = [
'api_key' => getenv('DISQUS_API_KEY'),
'api_secret' => getenv('DISQUS_API_SECRET'),
'access_token' => getenv('DISQUS_ACCESS_TOKEN'),
];
$client = Disguz::factory($config);
```
Then call one of the supported methods. Pass method parameters as an array:
```php
$params = [
'message' => 'This is another test post',
'thread' => $argv[1],
];
$result = $client->postsCreate($params);
```
## Supported Methods
The following methods are currently supported. For documentation on these API methods, visit https://disqus.com/api.
Support for additional methods is simply a matter of documenting them in `src/resources/disqus.json`, per the [Guzzle docs](http://guzzle3.readthedocs.org/en/latest/webservice-client/guzzle-service-descriptions.html). Please feel free to submit a pull request adding any methods from the Disqus API that you may require to this file.
### Threads
* [threadsList](https://disqus.com/api/docs/threads/list/)
* [threadsDetails](https://disqus.com/api/docs/threads/details/)
* [threadsCreate](https://disqus.com/api/docs/threads/create/)
* [threadsRemove](https://disqus.com/api/docs/threads/remove/)
* [threadsPopular](https://disqus.com/api/docs/threads/listPopular/)
### Posts
* [postsList](https://disqus.com/api/docs/posts/list/)
* [postsCreate](https://disqus.com/api/docs/posts/create/)
* [postsReport](https://disqus.com/api/docs/posts/report/)