mightstone.services.wiki.models.WikiTemplate

pydantic model mightstone.services.wiki.models.WikiTemplate

Representation of a wiki template

A template is wrapped in double curled brace: {{1}}, {{stats | uw=10}}

Show JSON schema
{
   "title": "WikiTemplate",
   "description": "Representation of a wiki template\n\nA template is wrapped in double curled brace: {{1}}, {{stats | uw=10}}",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "extra": {
         "anyOf": [
            {
               "$ref": "#/$defs/WikiElement"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "kwargs": {
         "additionalProperties": {
            "$ref": "#/$defs/WikiElement"
         },
         "default": {},
         "title": "Kwargs",
         "type": "object"
      },
      "args": {
         "default": [],
         "items": {
            "$ref": "#/$defs/WikiElement"
         },
         "title": "Args",
         "type": "array"
      }
   },
   "$defs": {
      "WikiElement": {
         "properties": {},
         "title": "WikiElement",
         "type": "object"
      }
   },
   "required": [
      "name"
   ]
}

Fields:
field args: list[WikiElement] = []
field extra: WikiElement | None = None
field kwargs: dict[str, WikiElement] = {}
field name: str [Required]
as_html()
as_text()
as_wiki()
static from_item(wiki_tag: ParseResults) WikiTemplate
get_arg(index: int) WikiElement | None
get_arg_as_text(index: int) str | None
get_kwarg(*keys: str) WikiElement | None
get_kwarg_as_text(*keys: str) str | None