Skip to content

dwrap

Sane object wrappers for data returned by the API

Contrib

Bases: _DataEntry

Represents a contribution (i.e. edit) made by a user, as obtained from Special:MyContributions.

__init__(e)

Initializer, creates a new Contrib

Parameters:

Name Type Description Default
e dict

A json object from the "contributions" list in the response from the server.

required

ImageInfo

Bases: _DataEntry

Represents an image info revision to a media file.

__init__(e)

Initializer, creates a new ImageInfo

Parameters:

Name Type Description Default
e dict

A json object from the "imageinfo" list in the response from the server.

required

Log

Bases: _DataEntry

Represents an log entry from Special:Log.

__init__(e)

Initializer, creates a new Log

Parameters:

Name Type Description Default
e dict

A json object from the "logevents" list in the response from the server.

required

Revision

Bases: _DataEntry

Represents an edit to a page on a wiki

__init__(e)

Initializer, creates a new Revision

Parameters:

Name Type Description Default
e dict

A json object from the "revisions" list in the response from the server.

required

__repr__()

Creates a str representation of this Revision. Useful for debugging.

Returns:

Name Type Description
str str

The str representation of this Revision.