Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC calls via Webinterface #1483

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open

Conversation

Nippey
Copy link
Contributor

@Nippey Nippey commented Jun 11, 2015

To start off with, if there is already a methond that I just couldn't find, please excuse me doing things for the sake of doing things :D
Forum Reference: http://forum.pyload.org/viewtopic.php?f=7&t=4321

I could not use the interface "http://PYLOAD.ADDR/api/call".
The reason is, that I cannot supply the type "ServiceCall" for the parameter "info" via URL.

I modified Api.py::call to also accept a dict as input parameter.

Now, I can call exposed API functions with the following URI encoded object:
{"plugin":"PLUGIN", "func":"FUNCTION", "arguments":['arg1','arg2'], "parseArguments":False}

For example:
http://PYLOAD.ADDR/api/call?info=%7B"plugin"%3A"UpdateManager"%2C"func"%3A"autoreloadPlugins"%2C"arguments"%3A[]%2C"parseArguments"%3AFalse%7D

Clear text of URL parameter
{"plugin":"UpdateManager","func":"autoreloadPlugins","arguments":[],"parseArguments":False}

Regards!

PS: Sooner or later, I consider adding additional content to the webinterface provided by plugins. Therefore I need to call their functions this way.

The reason is, that I cannot supply the type "ServiceCall" for the parameter "info".

Now, Api.py::call also accepts a dict as input parameter.
@vuolter vuolter added the enhancement New feature or bugfix label Jun 11, 2015
@vuolter vuolter added this to the 0.4.10 milestone Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or bugfix
Development

Successfully merging this pull request may close these issues.

None yet

2 participants