Skip to main content

Respectify PHP Library

Quickstart & Samples

For a quick start, read the Sample Code.

Namespaces

\Respectify

Classes

ClassDescription
CommentScoreRepresents the results of a comment evaluation by Respectify, and contains info on various aspects.
LogicalFallacyThe CommentScore class holds an array of logical fallacies. Each one is an instance of this class.
NegativeTonePhraseRepresents phrases that may not contribute to the health of a conversation, due to a negative tone.
ObjectionablePhraseRepresents an objectionable phrase identified in a comment. This is a potentially rude, offensive, etc term or phrase.
RespectifyClientAsyncRespectifyClientAsync 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

ClassDescription
BadRequestExceptionException thrown when the API returns a 400 Bad Request status code.
JsonDecodingExceptionException thrown when there is an error decoding JSON when parsing the Respectify API response.
RespectifyExceptionThe 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.
UnauthorizedExceptionException thrown when the API returns a 401 Unauthorized status code.
UnsupportedMediaTypeExceptionException thrown when the API returns a 415 Unsupported Media Type status code.