DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:remote_api

Struct Plugin

remote API

The struct plugin exposes several methods that can be accessed via the XML-RPC API. You can find the current code in the remote.php

Note: The method names are prefixed with plugin.struct., for example plugin.struct.getSchema

Methods

  • getData() Get the structured data of a given page
    1. parameter: string The page to get data for
    2. parameter: string The schema to use, empty for all
    3. parameter: int A timestamp if you want historic data (0 for now)
    • returns: array ('schema' ⇒ ( 'fieldlabel' ⇒ 'value', …))
  • saveData() Saves data for a given page (creates a new revision)
    If this call succeeds you can assume your data has either been saved or it was not necessary to save it because the data already existed in the wanted form or the given schemas are no longer assigned to that page.
    1. parameter: string page
    2. parameter: array ('schema' ⇒ ( 'fieldlabel' ⇒ 'value', …))
    3. parameter: string summary
    • return bool returns always true
  • getSchema() Get info about existing schemas columns
    Returns only current, enabled columns
    1. parameter: string the schema to query, empty for all
    • return array
  • getAggregationData() Get the data that would be shown in an aggregation
    1. parameter: array array of strings with the schema-names
    2. parameter: array array of strings with the columns
    3. parameter: array array of arrays with ['logic'⇒ 'and'|'or', 'condition' ⇒ 'your condition']
    4. parameter: string string indicating the column to sort by
    • return array array of rows, each row is an array of the column values
plugin/struct/remote_api.txt · Last modified: 2019-01-02 16:09 by glen