Joke

Represents a Joke returned in get_joke() method.

Attributes

category

The category of the joke.

Type: str

type

The type of joke. Can either be single or twopart.

Type: str

joke

The actual joke. This can be dict or str depending on what the type of joke is. If the type if single this will be str otherwise this will be dict having two values, setup and delivery. Read Jokes 101 page to see how joke object works.

Type: str or dict

flags

The flags a joke has. These are useful to filter the jokes.

Type: JokeFlags

id

The joke's unique ID.

Type: int

safe

Determines if the joke is marked safe or not.

This is very helpful to see if the joke is safe or not because if this is True, most of the explicit flags are usually False.

Type: bool

lang

The language of the joke. Mostly it is en

Type: str

language

An alias for lang attribute

Type: dict

Last updated