Format | Content Type |
---|---|
txt | text/plain |
json | text/json |
html | text/html |
LibInsult provides a few different languages, note that different languages might have different default templates.
Code | Description |
---|---|
en | English |
en_corporate | English corporate jargon |
You can play with the various parameters with the API Explorer.
In case of a successful request, the API will return a 200 page with the insult formatted in the requested format.
In case of incorrect parameters, the API will return a 400 error, the body of the response depends on the format.
A successful responses will contain the following data:
Name | Value |
---|---|
error | false |
insult | The generated string |
args | A dictionary listing the parameters used to generate the output, including default values. |
A failed response will have the following:
Name | Value |
---|---|
error | true |
error_message | A brief message describing the reason for the error. |
Url: /api/insult
Generates an insult in plain text.
Name | Description | Default |
---|---|---|
lang | Language | en |
template | Insult template | None |
who | Person to insult, changes the template to third person singular. | None |
plural | If present (with who) changes the template to third person plural. | None |
Url: /api/insult.html
Generates an insult in one of the supported formats.
Name | Description | Default |
---|---|---|
lang | Language | en |
template | Insult template | None |
who | Person to insult, changes the template to third person singular. | None |
plural | If present (with who) changes the template to third person plural. | None |
Url: /api/en/insult.html
Generates an insult in a fixed language.
Name | Description | Default |
---|---|---|
template | Insult template | None |
who | Person to insult, changes the template to third person singular. | None |
plural | If present (with who) changes the template to third person plural. | None |
Url: /api/adjective
Generates a single adjective in plain text.
Name | Description | Default |
---|---|---|
lang | Language | en |
Url: /api/adjective.html
Generates a single adjective in one of the supported formats.
Name | Description | Default |
---|---|---|
lang | Language | en |
Generates a single adjective in a fixed language.