diff options
Diffstat (limited to 'module/remote/thriftbackend/thriftgen/pyload/Pyload-remote')
-rwxr-xr-x | module/remote/thriftbackend/thriftgen/pyload/Pyload-remote | 491 |
1 files changed, 305 insertions, 186 deletions
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote index bfaf5b078..20015ba43 100755 --- a/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote +++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.9.0-dev) +# Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -23,76 +23,93 @@ if len(sys.argv) <= 1 or sys.argv[1] == '--help': print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' print '' print 'Functions:' - print ' string getConfigValue(string category, string option, string section)' - print ' void setConfigValue(string category, string option, string value, string section)' - print ' getConfig()' - print ' getPluginConfig()' + print ' string getServerVersion()' + print ' ServerStatus statusServer()' print ' void pauseServer()' print ' void unpauseServer()' print ' bool togglePause()' - print ' ServerStatus statusServer()' - print ' i64 freeSpace()' - print ' string getServerVersion()' + print ' ByteCount freeSpace()' print ' void kill()' print ' void restart()' print ' getLog(i32 offset)' print ' bool isTimeDownload()' print ' bool isTimeReconnect()' print ' bool toggleReconnect()' - print ' generatePackages(LinkList links)' + print ' getProgressInfo()' + print ' getConfig()' + print ' getGlobalPlugins()' + print ' getUserPlugins()' + print ' ConfigHolder configurePlugin(PluginName plugin)' + print ' void saveConfig(ConfigHolder config)' + print ' void deleteConfig(PluginName plugin)' + print ' void setConfigHandler(PluginName plugin, InteractionID iid, JSONString value)' print ' checkURLs(LinkList urls)' print ' parseURLs(string html, string url)' print ' OnlineCheck checkOnlineStatus(LinkList urls)' print ' OnlineCheck checkOnlineStatusContainer(LinkList urls, string filename, string data)' print ' OnlineCheck pollResults(ResultID rid)' - print ' statusDownloads()' - print ' PackageData getPackageData(PackageID pid)' - print ' PackageData getPackageInfo(PackageID pid)' - print ' FileData getFileData(FileID fid)' - print ' getQueue()' - print ' getCollector()' - print ' getQueueData()' - print ' getCollectorData()' - print ' getPackageOrder(Destination destination)' - print ' getFileOrder(PackageID pid)' - print ' generateAndAddPackages(LinkList links, Destination dest)' - print ' PackageID addPackage(string name, LinkList links, Destination dest)' - print ' void addFiles(PackageID pid, LinkList links)' - print ' void uploadContainer(string filename, string data)' + print ' generatePackages(LinkList links)' + print ' generateAndAddPackages(LinkList links, bool paused)' + print ' PackageID createPackage(string name, string folder, PackageID root, string password, string site, string comment, bool paused)' + print ' PackageID addPackage(string name, LinkList links, string password)' + print ' PackageID addPackageP(string name, LinkList links, string password, bool paused)' + print ' PackageID addPackageChild(string name, LinkList links, string password, PackageID root, bool paused)' + print ' PackageID uploadContainer(string filename, string data)' + print ' void addLinks(PackageID pid, LinkList links)' + print ' void addLocalFile(PackageID pid, string name, string path)' print ' void deleteFiles( fids)' print ' void deletePackages( pids)' - print ' void pushToQueue(PackageID pid)' - print ' void pullFromQueue(PackageID pid)' + print ' getCollector()' + print ' void addToCollector(LinkList links)' + print ' PackageID addFromCollector(string name, bool paused)' + print ' void renameCollPack(string name, string new_name)' + print ' void deleteCollPack(string name)' + print ' void deleteCollLink(string url)' + print ' TreeCollection getAllFiles()' + print ' TreeCollection getAllUnfinishedFiles()' + print ' TreeCollection getFileTree(PackageID pid, bool full)' + print ' TreeCollection getUnfinishedFileTree(PackageID pid, bool full)' + print ' TreeCollection getPackageContent(PackageID pid)' + print ' PackageInfo getPackageInfo(PackageID pid)' + print ' FileInfo getFileInfo(FileID fid)' + print ' TreeCollection findFiles(string pattern)' print ' void restartPackage(PackageID pid)' print ' void restartFile(FileID fid)' print ' void recheckPackage(PackageID pid)' - print ' void stopAllDownloads()' + print ' void restartFailed()' print ' void stopDownloads( fids)' - print ' void setPackageName(PackageID pid, string name)' - print ' void movePackage(Destination destination, PackageID pid)' - print ' void moveFiles( fids, PackageID pid)' - print ' void orderPackage(PackageID pid, i16 position)' - print ' void orderFile(FileID fid, i16 position)' + print ' void stopAllDownloads()' + print ' void setPackagePaused(PackageID pid, bool paused)' + print ' bool setPackageFolder(PackageID pid, string path)' print ' void setPackageData(PackageID pid, data)' - print ' deleteFinished()' - print ' void restartFailed()' + print ' bool movePackage(PackageID pid, PackageID root)' + print ' bool moveFiles( fids, PackageID pid)' + print ' void orderPackage( pids, i16 position)' + print ' void orderFiles( fids, PackageID pid, i16 position)' + print ' bool isInteractionWaiting(i16 mode)' + print ' InteractionTask getInteractionTask(i16 mode)' + print ' void setInteractionResult(InteractionID iid, JSONString result)' + print ' string generateDownloadLink(FileID fid, i16 timeout)' + print ' getNotifications()' print ' getEvents(string uuid)' print ' getAccounts(bool refresh)' print ' getAccountTypes()' - print ' void updateAccount(PluginName plugin, string account, string password, options)' + print ' void updateAccount(PluginName plugin, string account, string password)' + print ' void updateAccountInfo(AccountInfo account)' print ' void removeAccount(PluginName plugin, string account)' print ' bool login(string username, string password)' - print ' UserData getUserData(string username, string password)' + print ' UserData getUserData()' print ' getAllUserData()' - print ' getServices()' - print ' bool hasService(PluginName plugin, string func)' - print ' string call(ServiceCall info)' + print ' UserData addUser(string username, string password)' + print ' void updateUserData(UserData data)' + print ' void removeUser(UserID uid)' + print ' bool setPassword(string username, string old_password, string new_password)' print ' getAllInfo()' print ' getInfoByPlugin(PluginName plugin)' - print ' bool isCaptchaWaiting()' - print ' CaptchaTask getCaptchaTask(bool exclusive)' - print ' string getCaptchaTaskStatus(TaskID tid)' - print ' void setCaptchaResult(TaskID tid, string result)' + print ' getAddonHandler()' + print ' bool hasAddonHandler(PluginName plugin, string func)' + print ' void callAddon(PluginName plugin, string func, arguments)' + print ' void callAddonHandler(PluginName plugin, string func, PackageID pid_or_fid)' print '' sys.exit(0) @@ -144,29 +161,17 @@ protocol = TBinaryProtocol.TBinaryProtocol(transport) client = Pyload.Client(protocol) transport.open() -if cmd == 'getConfigValue': - if len(args) != 3: - print 'getConfigValue requires 3 args' - sys.exit(1) - pp.pprint(client.getConfigValue(args[0],args[1],args[2],)) - -elif cmd == 'setConfigValue': - if len(args) != 4: - print 'setConfigValue requires 4 args' - sys.exit(1) - pp.pprint(client.setConfigValue(args[0],args[1],args[2],args[3],)) - -elif cmd == 'getConfig': +if cmd == 'getServerVersion': if len(args) != 0: - print 'getConfig requires 0 args' + print 'getServerVersion requires 0 args' sys.exit(1) - pp.pprint(client.getConfig()) + pp.pprint(client.getServerVersion()) -elif cmd == 'getPluginConfig': +elif cmd == 'statusServer': if len(args) != 0: - print 'getPluginConfig requires 0 args' + print 'statusServer requires 0 args' sys.exit(1) - pp.pprint(client.getPluginConfig()) + pp.pprint(client.statusServer()) elif cmd == 'pauseServer': if len(args) != 0: @@ -186,24 +191,12 @@ elif cmd == 'togglePause': sys.exit(1) pp.pprint(client.togglePause()) -elif cmd == 'statusServer': - if len(args) != 0: - print 'statusServer requires 0 args' - sys.exit(1) - pp.pprint(client.statusServer()) - elif cmd == 'freeSpace': if len(args) != 0: print 'freeSpace requires 0 args' sys.exit(1) pp.pprint(client.freeSpace()) -elif cmd == 'getServerVersion': - if len(args) != 0: - print 'getServerVersion requires 0 args' - sys.exit(1) - pp.pprint(client.getServerVersion()) - elif cmd == 'kill': if len(args) != 0: print 'kill requires 0 args' @@ -240,11 +233,53 @@ elif cmd == 'toggleReconnect': sys.exit(1) pp.pprint(client.toggleReconnect()) -elif cmd == 'generatePackages': +elif cmd == 'getProgressInfo': + if len(args) != 0: + print 'getProgressInfo requires 0 args' + sys.exit(1) + pp.pprint(client.getProgressInfo()) + +elif cmd == 'getConfig': + if len(args) != 0: + print 'getConfig requires 0 args' + sys.exit(1) + pp.pprint(client.getConfig()) + +elif cmd == 'getGlobalPlugins': + if len(args) != 0: + print 'getGlobalPlugins requires 0 args' + sys.exit(1) + pp.pprint(client.getGlobalPlugins()) + +elif cmd == 'getUserPlugins': + if len(args) != 0: + print 'getUserPlugins requires 0 args' + sys.exit(1) + pp.pprint(client.getUserPlugins()) + +elif cmd == 'configurePlugin': if len(args) != 1: - print 'generatePackages requires 1 args' + print 'configurePlugin requires 1 args' sys.exit(1) - pp.pprint(client.generatePackages(eval(args[0]),)) + pp.pprint(client.configurePlugin(eval(args[0]),)) + +elif cmd == 'saveConfig': + if len(args) != 1: + print 'saveConfig requires 1 args' + sys.exit(1) + pp.pprint(client.saveConfig(eval(args[0]),)) + +elif cmd == 'deleteConfig': + if len(args) != 1: + print 'deleteConfig requires 1 args' + sys.exit(1) + pp.pprint(client.deleteConfig(eval(args[0]),)) + +elif cmd == 'setConfigHandler': + if len(args) != 3: + print 'setConfigHandler requires 3 args' + sys.exit(1) + pp.pprint(client.setConfigHandler(eval(args[0]),eval(args[1]),eval(args[2]),)) elif cmd == 'checkURLs': if len(args) != 1: @@ -276,35 +311,71 @@ elif cmd == 'pollResults': sys.exit(1) pp.pprint(client.pollResults(eval(args[0]),)) -elif cmd == 'statusDownloads': - if len(args) != 0: - print 'statusDownloads requires 0 args' +elif cmd == 'generatePackages': + if len(args) != 1: + print 'generatePackages requires 1 args' sys.exit(1) - pp.pprint(client.statusDownloads()) + pp.pprint(client.generatePackages(eval(args[0]),)) -elif cmd == 'getPackageData': - if len(args) != 1: - print 'getPackageData requires 1 args' +elif cmd == 'generateAndAddPackages': + if len(args) != 2: + print 'generateAndAddPackages requires 2 args' sys.exit(1) - pp.pprint(client.getPackageData(eval(args[0]),)) + pp.pprint(client.generateAndAddPackages(eval(args[0]),eval(args[1]),)) -elif cmd == 'getPackageInfo': - if len(args) != 1: - print 'getPackageInfo requires 1 args' +elif cmd == 'createPackage': + if len(args) != 7: + print 'createPackage requires 7 args' sys.exit(1) - pp.pprint(client.getPackageInfo(eval(args[0]),)) + pp.pprint(client.createPackage(args[0],args[1],eval(args[2]),args[3],args[4],args[5],eval(args[6]),)) + +elif cmd == 'addPackage': + if len(args) != 3: + print 'addPackage requires 3 args' + sys.exit(1) + pp.pprint(client.addPackage(args[0],eval(args[1]),args[2],)) + +elif cmd == 'addPackageP': + if len(args) != 4: + print 'addPackageP requires 4 args' + sys.exit(1) + pp.pprint(client.addPackageP(args[0],eval(args[1]),args[2],eval(args[3]),)) + +elif cmd == 'addPackageChild': + if len(args) != 5: + print 'addPackageChild requires 5 args' + sys.exit(1) + pp.pprint(client.addPackageChild(args[0],eval(args[1]),args[2],eval(args[3]),eval(args[4]),)) + +elif cmd == 'uploadContainer': + if len(args) != 2: + print 'uploadContainer requires 2 args' + sys.exit(1) + pp.pprint(client.uploadContainer(args[0],args[1],)) -elif cmd == 'getFileData': +elif cmd == 'addLinks': + if len(args) != 2: + print 'addLinks requires 2 args' + sys.exit(1) + pp.pprint(client.addLinks(eval(args[0]),eval(args[1]),)) + +elif cmd == 'addLocalFile': + if len(args) != 3: + print 'addLocalFile requires 3 args' + sys.exit(1) + pp.pprint(client.addLocalFile(eval(args[0]),args[1],args[2],)) + +elif cmd == 'deleteFiles': if len(args) != 1: - print 'getFileData requires 1 args' + print 'deleteFiles requires 1 args' sys.exit(1) - pp.pprint(client.getFileData(eval(args[0]),)) + pp.pprint(client.deleteFiles(eval(args[0]),)) -elif cmd == 'getQueue': - if len(args) != 0: - print 'getQueue requires 0 args' +elif cmd == 'deletePackages': + if len(args) != 1: + print 'deletePackages requires 1 args' sys.exit(1) - pp.pprint(client.getQueue()) + pp.pprint(client.deletePackages(eval(args[0]),)) elif cmd == 'getCollector': if len(args) != 0: @@ -312,77 +383,83 @@ elif cmd == 'getCollector': sys.exit(1) pp.pprint(client.getCollector()) -elif cmd == 'getQueueData': - if len(args) != 0: - print 'getQueueData requires 0 args' +elif cmd == 'addToCollector': + if len(args) != 1: + print 'addToCollector requires 1 args' sys.exit(1) - pp.pprint(client.getQueueData()) + pp.pprint(client.addToCollector(eval(args[0]),)) -elif cmd == 'getCollectorData': - if len(args) != 0: - print 'getCollectorData requires 0 args' +elif cmd == 'addFromCollector': + if len(args) != 2: + print 'addFromCollector requires 2 args' + sys.exit(1) + pp.pprint(client.addFromCollector(args[0],eval(args[1]),)) + +elif cmd == 'renameCollPack': + if len(args) != 2: + print 'renameCollPack requires 2 args' sys.exit(1) - pp.pprint(client.getCollectorData()) + pp.pprint(client.renameCollPack(args[0],args[1],)) -elif cmd == 'getPackageOrder': +elif cmd == 'deleteCollPack': if len(args) != 1: - print 'getPackageOrder requires 1 args' + print 'deleteCollPack requires 1 args' sys.exit(1) - pp.pprint(client.getPackageOrder(eval(args[0]),)) + pp.pprint(client.deleteCollPack(args[0],)) -elif cmd == 'getFileOrder': +elif cmd == 'deleteCollLink': if len(args) != 1: - print 'getFileOrder requires 1 args' + print 'deleteCollLink requires 1 args' sys.exit(1) - pp.pprint(client.getFileOrder(eval(args[0]),)) + pp.pprint(client.deleteCollLink(args[0],)) -elif cmd == 'generateAndAddPackages': - if len(args) != 2: - print 'generateAndAddPackages requires 2 args' +elif cmd == 'getAllFiles': + if len(args) != 0: + print 'getAllFiles requires 0 args' sys.exit(1) - pp.pprint(client.generateAndAddPackages(eval(args[0]),eval(args[1]),)) + pp.pprint(client.getAllFiles()) -elif cmd == 'addPackage': - if len(args) != 3: - print 'addPackage requires 3 args' +elif cmd == 'getAllUnfinishedFiles': + if len(args) != 0: + print 'getAllUnfinishedFiles requires 0 args' sys.exit(1) - pp.pprint(client.addPackage(args[0],eval(args[1]),eval(args[2]),)) + pp.pprint(client.getAllUnfinishedFiles()) -elif cmd == 'addFiles': +elif cmd == 'getFileTree': if len(args) != 2: - print 'addFiles requires 2 args' + print 'getFileTree requires 2 args' sys.exit(1) - pp.pprint(client.addFiles(eval(args[0]),eval(args[1]),)) + pp.pprint(client.getFileTree(eval(args[0]),eval(args[1]),)) -elif cmd == 'uploadContainer': +elif cmd == 'getUnfinishedFileTree': if len(args) != 2: - print 'uploadContainer requires 2 args' + print 'getUnfinishedFileTree requires 2 args' sys.exit(1) - pp.pprint(client.uploadContainer(args[0],args[1],)) + pp.pprint(client.getUnfinishedFileTree(eval(args[0]),eval(args[1]),)) -elif cmd == 'deleteFiles': +elif cmd == 'getPackageContent': if len(args) != 1: - print 'deleteFiles requires 1 args' + print 'getPackageContent requires 1 args' sys.exit(1) - pp.pprint(client.deleteFiles(eval(args[0]),)) + pp.pprint(client.getPackageContent(eval(args[0]),)) -elif cmd == 'deletePackages': +elif cmd == 'getPackageInfo': if len(args) != 1: - print 'deletePackages requires 1 args' + print 'getPackageInfo requires 1 args' sys.exit(1) - pp.pprint(client.deletePackages(eval(args[0]),)) + pp.pprint(client.getPackageInfo(eval(args[0]),)) -elif cmd == 'pushToQueue': +elif cmd == 'getFileInfo': if len(args) != 1: - print 'pushToQueue requires 1 args' + print 'getFileInfo requires 1 args' sys.exit(1) - pp.pprint(client.pushToQueue(eval(args[0]),)) + pp.pprint(client.getFileInfo(eval(args[0]),)) -elif cmd == 'pullFromQueue': +elif cmd == 'findFiles': if len(args) != 1: - print 'pullFromQueue requires 1 args' + print 'findFiles requires 1 args' sys.exit(1) - pp.pprint(client.pullFromQueue(eval(args[0]),)) + pp.pprint(client.findFiles(args[0],)) elif cmd == 'restartPackage': if len(args) != 1: @@ -402,11 +479,11 @@ elif cmd == 'recheckPackage': sys.exit(1) pp.pprint(client.recheckPackage(eval(args[0]),)) -elif cmd == 'stopAllDownloads': +elif cmd == 'restartFailed': if len(args) != 0: - print 'stopAllDownloads requires 0 args' + print 'restartFailed requires 0 args' sys.exit(1) - pp.pprint(client.stopAllDownloads()) + pp.pprint(client.restartFailed()) elif cmd == 'stopDownloads': if len(args) != 1: @@ -414,11 +491,29 @@ elif cmd == 'stopDownloads': sys.exit(1) pp.pprint(client.stopDownloads(eval(args[0]),)) -elif cmd == 'setPackageName': +elif cmd == 'stopAllDownloads': + if len(args) != 0: + print 'stopAllDownloads requires 0 args' + sys.exit(1) + pp.pprint(client.stopAllDownloads()) + +elif cmd == 'setPackagePaused': + if len(args) != 2: + print 'setPackagePaused requires 2 args' + sys.exit(1) + pp.pprint(client.setPackagePaused(eval(args[0]),eval(args[1]),)) + +elif cmd == 'setPackageFolder': if len(args) != 2: - print 'setPackageName requires 2 args' + print 'setPackageFolder requires 2 args' sys.exit(1) - pp.pprint(client.setPackageName(eval(args[0]),args[1],)) + pp.pprint(client.setPackageFolder(eval(args[0]),args[1],)) + +elif cmd == 'setPackageData': + if len(args) != 2: + print 'setPackageData requires 2 args' + sys.exit(1) + pp.pprint(client.setPackageData(eval(args[0]),eval(args[1]),)) elif cmd == 'movePackage': if len(args) != 2: @@ -438,29 +533,41 @@ elif cmd == 'orderPackage': sys.exit(1) pp.pprint(client.orderPackage(eval(args[0]),eval(args[1]),)) -elif cmd == 'orderFile': - if len(args) != 2: - print 'orderFile requires 2 args' +elif cmd == 'orderFiles': + if len(args) != 3: + print 'orderFiles requires 3 args' sys.exit(1) - pp.pprint(client.orderFile(eval(args[0]),eval(args[1]),)) + pp.pprint(client.orderFiles(eval(args[0]),eval(args[1]),eval(args[2]),)) -elif cmd == 'setPackageData': +elif cmd == 'isInteractionWaiting': + if len(args) != 1: + print 'isInteractionWaiting requires 1 args' + sys.exit(1) + pp.pprint(client.isInteractionWaiting(eval(args[0]),)) + +elif cmd == 'getInteractionTask': + if len(args) != 1: + print 'getInteractionTask requires 1 args' + sys.exit(1) + pp.pprint(client.getInteractionTask(eval(args[0]),)) + +elif cmd == 'setInteractionResult': if len(args) != 2: - print 'setPackageData requires 2 args' + print 'setInteractionResult requires 2 args' sys.exit(1) - pp.pprint(client.setPackageData(eval(args[0]),eval(args[1]),)) + pp.pprint(client.setInteractionResult(eval(args[0]),eval(args[1]),)) -elif cmd == 'deleteFinished': - if len(args) != 0: - print 'deleteFinished requires 0 args' +elif cmd == 'generateDownloadLink': + if len(args) != 2: + print 'generateDownloadLink requires 2 args' sys.exit(1) - pp.pprint(client.deleteFinished()) + pp.pprint(client.generateDownloadLink(eval(args[0]),eval(args[1]),)) -elif cmd == 'restartFailed': +elif cmd == 'getNotifications': if len(args) != 0: - print 'restartFailed requires 0 args' + print 'getNotifications requires 0 args' sys.exit(1) - pp.pprint(client.restartFailed()) + pp.pprint(client.getNotifications()) elif cmd == 'getEvents': if len(args) != 1: @@ -481,10 +588,16 @@ elif cmd == 'getAccountTypes': pp.pprint(client.getAccountTypes()) elif cmd == 'updateAccount': - if len(args) != 4: - print 'updateAccount requires 4 args' + if len(args) != 3: + print 'updateAccount requires 3 args' sys.exit(1) - pp.pprint(client.updateAccount(eval(args[0]),args[1],args[2],eval(args[3]),)) + pp.pprint(client.updateAccount(eval(args[0]),args[1],args[2],)) + +elif cmd == 'updateAccountInfo': + if len(args) != 1: + print 'updateAccountInfo requires 1 args' + sys.exit(1) + pp.pprint(client.updateAccountInfo(eval(args[0]),)) elif cmd == 'removeAccount': if len(args) != 2: @@ -499,10 +612,10 @@ elif cmd == 'login': pp.pprint(client.login(args[0],args[1],)) elif cmd == 'getUserData': - if len(args) != 2: - print 'getUserData requires 2 args' + if len(args) != 0: + print 'getUserData requires 0 args' sys.exit(1) - pp.pprint(client.getUserData(args[0],args[1],)) + pp.pprint(client.getUserData()) elif cmd == 'getAllUserData': if len(args) != 0: @@ -510,23 +623,29 @@ elif cmd == 'getAllUserData': sys.exit(1) pp.pprint(client.getAllUserData()) -elif cmd == 'getServices': - if len(args) != 0: - print 'getServices requires 0 args' +elif cmd == 'addUser': + if len(args) != 2: + print 'addUser requires 2 args' sys.exit(1) - pp.pprint(client.getServices()) + pp.pprint(client.addUser(args[0],args[1],)) -elif cmd == 'hasService': - if len(args) != 2: - print 'hasService requires 2 args' +elif cmd == 'updateUserData': + if len(args) != 1: + print 'updateUserData requires 1 args' sys.exit(1) - pp.pprint(client.hasService(eval(args[0]),args[1],)) + pp.pprint(client.updateUserData(eval(args[0]),)) -elif cmd == 'call': +elif cmd == 'removeUser': if len(args) != 1: - print 'call requires 1 args' + print 'removeUser requires 1 args' + sys.exit(1) + pp.pprint(client.removeUser(eval(args[0]),)) + +elif cmd == 'setPassword': + if len(args) != 3: + print 'setPassword requires 3 args' sys.exit(1) - pp.pprint(client.call(eval(args[0]),)) + pp.pprint(client.setPassword(args[0],args[1],args[2],)) elif cmd == 'getAllInfo': if len(args) != 0: @@ -540,29 +659,29 @@ elif cmd == 'getInfoByPlugin': sys.exit(1) pp.pprint(client.getInfoByPlugin(eval(args[0]),)) -elif cmd == 'isCaptchaWaiting': +elif cmd == 'getAddonHandler': if len(args) != 0: - print 'isCaptchaWaiting requires 0 args' + print 'getAddonHandler requires 0 args' sys.exit(1) - pp.pprint(client.isCaptchaWaiting()) + pp.pprint(client.getAddonHandler()) -elif cmd == 'getCaptchaTask': - if len(args) != 1: - print 'getCaptchaTask requires 1 args' +elif cmd == 'hasAddonHandler': + if len(args) != 2: + print 'hasAddonHandler requires 2 args' sys.exit(1) - pp.pprint(client.getCaptchaTask(eval(args[0]),)) + pp.pprint(client.hasAddonHandler(eval(args[0]),args[1],)) -elif cmd == 'getCaptchaTaskStatus': - if len(args) != 1: - print 'getCaptchaTaskStatus requires 1 args' +elif cmd == 'callAddon': + if len(args) != 3: + print 'callAddon requires 3 args' sys.exit(1) - pp.pprint(client.getCaptchaTaskStatus(eval(args[0]),)) + pp.pprint(client.callAddon(eval(args[0]),args[1],eval(args[2]),)) -elif cmd == 'setCaptchaResult': - if len(args) != 2: - print 'setCaptchaResult requires 2 args' +elif cmd == 'callAddonHandler': + if len(args) != 3: + print 'callAddonHandler requires 3 args' sys.exit(1) - pp.pprint(client.setCaptchaResult(eval(args[0]),args[1],)) + pp.pprint(client.callAddonHandler(eval(args[0]),args[1],eval(args[2]),)) else: print 'Unrecognized method %s' % cmd |