JohnDoee / deluge-client

A very lightweight pure-python Deluge RPC Client
MIT License
87 stars 14 forks source link

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

Closed gazpachoking closed 6 years ago

gazpachoking commented 6 years ago

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 commented 6 years ago

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.