GET api/Jokes?isClean={isClean}
Gets a random joke.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| isClean |
If set to 'true', the returned joke will not contain bad words. |
boolean |
Default value is False |
Body Parameters
None.
Response Information
Resource Description
Returns a random joke.
JokeLikesDislikesModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Dislikes |
The number of dislikes a joke has. |
integer |
None. |
| IsClean |
True if the joke does not contain any bad phrases. |
boolean |
None. |
| IsVerified |
True if the joke has been verified by an admin. |
boolean |
None. |
| BadPhrases |
Bad phrases in the joke. |
Collection of string |
None. |
| Likes |
The number of likes a joke has. |
integer |
None. |
| JokeId |
The ID of the joke. |
integer |
Required |
| IsVerified |
True if the joke has been verified by an admin. |
boolean |
None. |
| Question |
The question of the joke (first part). |
string |
Required Max length: 425 |
| Answer |
The answer to the question of the joke (second part). |
string |
Required Max length: 425 |
Response Formats
application/json, text/json
Sample:
{
"Dislikes": 1,
"IsClean": true,
"IsVerified": true,
"BadPhrases": [
"sample string 1",
"sample string 2"
],
"Likes": 4,
"JokeId": 5,
"Question": "sample string 6",
"Answer": "sample string 7"
}
text/xml
Sample:
<JokeLikesDislikesModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VeryPunny.Models">
<Answer>sample string 7</Answer>
<Question>sample string 6</Question>
<IsVerified xmlns:d2p1="http://www.w3.org/2001/XMLSchema" i:type="d2p1:boolean">true</IsVerified>
<JokeId>5</JokeId>
<Likes>4</Likes>
<BadPhrases xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</BadPhrases>
<Dislikes>1</Dislikes>
<IsClean>true</IsClean>
<IsVerified xmlns:d2p1="http://www.w3.org/2001/XMLSchema" i:type="d2p1:boolean">true</IsVerified>
</JokeLikesDislikesModel>