woob.capabilities.content

class woob.capabilities.content.CapContent

Bases: woob.capabilities.base.Capability

get_content(id, revision=None)

Get a content from an ID.

Parameters
  • id (str) – ID of content

  • revision (Revision) – if given, get the content at this revision

Return type

Content

get_content_preview(content)

Get a HTML preview of a content.

Parameters

content (Content) – content object

Return type

str

iter_revisions(id)

Iter revisions of a content.

Parameters

id (str) – id of content

Return type

iter[Revision]

push_content(content, message=None, minor=False)

Push a new revision of a content.

Parameters
  • content (Content) – object to push

  • message (str) – log message to associate to new revision

  • minor (bool) – this is a minor revision

class woob.capabilities.content.Content(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject

Content object.

Variables
  • title – (str) Title of content

  • author – (str) Original author of content

  • content – (str) Body

  • revision – (str) ID of revision

class woob.capabilities.content.Revision(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject

Revision of a change on a content.

Variables
  • author – (str) Author of revision

  • comment – (str) Comment log about revision

  • timestamp – (date, datetime) Date of revision

  • minor – (bool) Is this change minor?