@@ -179,6 +179,7 @@ def __init__(self, url, user, password, **kwargs):
179179 # Set "namespaces" for pages and medias functions.
180180 self .pages = _Pages (weakref .ref (self )())
181181 self .medias = _Medias (weakref .ref (self )())
182+ self .structs = _Structs (weakref .ref (self )())
182183
183184 def send (self , command , * args , ** kwargs ):
184185 """Generic method for executing an XML-RPC *command*. *args* and
@@ -463,6 +464,29 @@ def delete(self, media):
463464 return self ._dokuwiki .send ('wiki.deleteAttachment' , media )
464465
465466
467+ class _Structs (object ):
468+ def __init__ (self , dokuwiki ):
469+ """Get the structured data of a given page."""
470+ self ._dokuwiki = dokuwiki
471+
472+ def get_data (self , page , schema = '' , timestamp = 0 ):
473+ """Get the structured data of a given page."""
474+ return self ._dokuwiki .send ('plugin.struct.getData' , page , schema , timestamp )
475+
476+ def save_data (self , page , data , summary = '' ):
477+ """Saves data for a given page (creates a new revision)."""
478+ return self ._dokuwiki .send ('plugin.struct.saveData' , page , data , summary )
479+
480+ def get_schema (self , name = '' ):
481+ """Get info about existing schemas columns."""
482+ return self ._dokuwiki .send ('plugin.struct.getSchema' , name )
483+
484+ def get_aggregation_data (self , schemas , columns , data_filter = [], sort = '' ):
485+ """Get the data that would be shown in an aggregation."""
486+ return self ._dokuwiki .send (
487+ 'plugin.struct.getAggregationData' , schemas , columns , data_filter , sort )
488+
489+
466490class Dataentry (object ):
467491 """Object that manage `data entries <https://www.dokuwiki.org/plugin:data>`_."""
468492
0 commit comments