Plugin to support EJC classes
The latest version of this plugin can be found here.
The ZIP can be downloaded and installed using the plugin manager, or used directly (recommended).
Github has an overwiew page to get a list of all release.
Use the following endpoints to work with preferences:
Returns all preferences known to the plugin. Currently there is only prefs
available.
For access the GJSON Syntax is used. For that the path is converted to GJSON by replacing /
with .
. .
is replaced by \.
. Make sure to escape all path elements using the URL % escape notation. A #
becomes a %23
.
Post all prefs, supported top level keys are:
viewsets
To access deeper members of JSON data, SJSON is used. The GET rules for path replacements are applied for SJSON too, see the Example section for an example.
> curl -X 'POST' -d '{"viewsets": {"views": [{"a": "b"},{"c": "d"}]}}' -H "Authorization: Bearer $ACCESS_TOKEN" http://localhost/api/v1/config/plugin/ejc/config/prefs
{
"viewsets": {
"views": [
{
"a": "b"
},
{
"c": "d"
},
]
},
"viewsets:info": {
"is_default": false
}
}
> curl -X 'POST' -d '{"e": "f"}' -H "Authorization: Bearer $ACCESS_TOKEN" http://localhost/api/v1/config/plugin/ejc/config/prefs/viewsets/views/-1
null
null
is returned, because the -1
doesn't work as a GJSON
path.
> curl -X 'DELETE' -H "Authorization: Bearer $ACCESS_TOKEN" http://localhost/api/v1/config/plugin/ejc/config/prefs/viewsets/views/0
{
"c": "d"
}
> curl -X 'GET' -H "Authorization: Bearer $ACCESS_TOKEN" http://localhost/api/v1/config/plugin/ejc/config
{
"prefs": {
"viewsets": {
"views": [
{
"c": "d"
},
{
"e": "f"
}
]
},
"viewsets:info": {
"is_default": false
}
}
}
> curl -X 'GET' -H "Authorization: Bearer $ACCESS_TOKEN" http://localhost/api/v1/config/plugin/ejc/config/prefs/viewsets/views/%23(c=d)/c"
"d"