Download the PHP package anycomment/php-sdk without Composer
On this page you can find all versions of the php package anycomment/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anycomment/php-sdk
More information about anycomment/php-sdk
Files in anycomment/php-sdk
Package php-sdk
Short Description PHP SDK to communicate with AnyComment REST API
License
Informations about the package php-sdk
AnyComment PHP-SDK
AnyComment API is an HTTP-based interface created for developers to help to work with AnyComment REST services.
The documentation can be found here.
Minimum requirement is PHP 5.6.
Installation
Add new package to composer.json
in your project directory:
or
Tests
Run the following command to start tests:
Examples
Examples can be found in /examples
folder.
Notice that you need to provide your API key for each example to make it work.
Usage
You need to prepare a configuration class and pass your API key to constructor.
See example:
Then call some endpoint. Every endpoint would return same mapped response envelope, such
as AnyComment\Dto\ResponseEnveloper
.
Let's see in action, if we call endpoint to get website information:
This would be the output:
API
Website
getInfo()
Get website information.
Example:
Page
getCommentCount(string $url)
Get number of comments per requested page URL.
Example:
Profile
getInfo(int $id, string $oauthToken)
Get profile information for given profile ID.
Example:
Comment
getList(?string $createdDate = null, ?string $pageUrl = null)
Get list of comments chronologically since given date (when provided).
You may also provide page URL for which to get comments for.
Example:
create(CommentCreateRequest $commentObject)
Create new comment with given data.
Example: