Skip to content

Allows RPC methods to be called on client object directly#19

Merged
JohnDoee merged 1 commit intoJohnDoee:developfrom
gazpachoking:rpc_attr_caller
May 20, 2018
Merged

Allows RPC methods to be called on client object directly#19
JohnDoee merged 1 commit intoJohnDoee:developfrom
gazpachoking:rpc_attr_caller

Conversation

@gazpachoking
Copy link
Copy Markdown
Contributor

Not sure if you are in to this, it allows an alternate method of calling RPC functions:

client.call('core.methodname', arg)

can be called instead like

client.core.methodname(arg)

I am a little dubious, since we can't validate what's a valid method, and deluge doesn't seem to send back any error with invalid methods, but that's true for the .call() format as well.

@JohnDoee
Copy link
Copy Markdown
Owner

Since the official Deluge client does it this way, I don't mind adding it.

My problem with it is that it hides away you're doing a network call and make it seem like a local function call.

@JohnDoee JohnDoee merged commit 7ef9e3d into JohnDoee:develop May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants