@@ -96,6 +96,7 @@ def __init__(self, url, user, password, **kwargs):
9696 # Set "namespaces" for pages and medias functions.
9797 self .pages = _Pages (weakref .ref (self )())
9898 self .medias = _Medias (weakref .ref (self )())
99+ self .structs = _Structs (weakref .ref (self )())
99100
100101 def send (self , command , * args , ** kwargs ):
101102 """Generic method for executing an XML-RPC *command*. *args* and
@@ -379,6 +380,29 @@ def delete(self, media):
379380 return self ._dokuwiki .send ('wiki.deleteAttachment' , media )
380381
381382
383+ class _Structs (object ):
384+ def __init__ (self , dokuwiki ):
385+ """Get the structured data of a given page."""
386+ self ._dokuwiki = dokuwiki
387+
388+ def get_data (self , page , schema , timestamp = 0 ):
389+ """Get the structured data of a given page."""
390+ return self ._dokuwiki .send ('plugin.struct.getData' , page , schema , timestamp )
391+
392+ def save_data (self , page , data , summary = '' ):
393+ """Saves data for a given page (creates a new revision)."""
394+ return self ._dokuwiki .send ('plugin.struct.saveData' , page , data , summary )
395+
396+ def get_schema (self , name = '' ):
397+ """Get info about existing schemas columns."""
398+ return self ._dokuwiki .send ('plugin.struct.getSchema' , name )
399+
400+ def get_aggregation_data (self , schemas , columns , data_filter = [], sort = '' ):
401+ """Get the data that would be shown in an aggregation."""
402+ return self ._dokuwiki .send (
403+ 'plugin.struct.getAggregationData' , schemas , columns , data_filter , sort )
404+
405+
382406class Dataentry (object ):
383407 """Object that manage `data entries <https://www.dokuwiki.org/plugin:data>`_."""
384408
0 commit comments