Respectify PHP Library
Quickstart & Samples
For a quick start, read the Sample Code.
Namespaces
\Respectify
Classes
| Class | Description |
|---|---|
CommentScore | Represents the results of a comment evaluation by Respectify, and contains info on various aspects. |
LogicalFallacy | The CommentScore class holds an array of logical fallacies. Each one is an instance of this class. |
NegativeTonePhrase | Represents phrases that may not contribute to the health of a conversation, due to a negative tone. |
ObjectionablePhrase | Represents an objectionable phrase identified in a comment. This is a potentially rude, offensive, etc term or phrase. |
RespectifyClientAsync | RespectifyClientAsync lets you interact with the Respectify API. It is asynchronous, meaning you need to run the event loop to get results. This is important for high-performance applications. |
\Respectify\Exceptions
Classes
| Class | Description |
|---|---|
BadRequestException | Exception thrown when the API returns a 400 Bad Request status code. |
JsonDecodingException | Exception thrown when there is an error decoding JSON when parsing the Respectify API response. |
RespectifyException | The base exception class for all Respectify exceptions. You can catch this as a generic way to catch all Respectify-specific exceptions. Of course, other exceptions may still be thrown by the underlying code. |
UnauthorizedException | Exception thrown when the API returns a 401 Unauthorized status code. |
UnsupportedMediaTypeException | Exception thrown when the API returns a 415 Unsupported Media Type status code. |