From e00ef98491f79ae8aa972ae1473dae4a7b78c07e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 13 Apr 2015 17:20:59 +0200 Subject: Cleanup --- pyload/api/types.py | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) (limited to 'pyload/api/types.py') diff --git a/pyload/api/types.py b/pyload/api/types.py index 81385bf9f..10a64a813 100644 --- a/pyload/api/types.py +++ b/pyload/api/types.py @@ -50,6 +50,7 @@ class Output(object): class AccountInfo(BaseObject): __slots__ = ['validuntil', 'login', 'options', 'valid', 'trafficleft', 'maxtraffic', 'premium', 'type'] + def __init__(self, validuntil=None, login=None, options=None, valid=None, trafficleft=None, maxtraffic=None, premium=None, type=None): self.validuntil = validuntil self.login = login @@ -63,6 +64,7 @@ class AccountInfo(BaseObject): class CaptchaTask(BaseObject): __slots__ = ['tid', 'data', 'type', 'resultType'] + def __init__(self, tid=None, data=None, type=None, resultType=None): self.tid = tid self.data = data @@ -72,6 +74,7 @@ class CaptchaTask(BaseObject): class ConfigItem(BaseObject): __slots__ = ['name', 'description', 'value', 'type'] + def __init__(self, name=None, description=None, value=None, type=None): self.name = name self.description = description @@ -81,6 +84,7 @@ class ConfigItem(BaseObject): class ConfigSection(BaseObject): __slots__ = ['name', 'description', 'items', 'outline'] + def __init__(self, name=None, description=None, items=None, outline=None): self.name = name self.description = description @@ -90,6 +94,7 @@ class ConfigSection(BaseObject): class DownloadInfo(BaseObject): __slots__ = ['fid', 'name', 'speed', 'eta', 'format_eta', 'bleft', 'size', 'format_size', 'percent', 'status', 'statusmsg', 'format_wait', 'wait_until', 'packageID', 'packageName', 'plugin'] + def __init__(self, fid=None, name=None, speed=None, eta=None, format_eta=None, bleft=None, size=None, format_size=None, percent=None, status=None, statusmsg=None, format_wait=None, wait_until=None, packageID=None, packageName=None, plugin=None): self.fid = fid self.name = name @@ -111,6 +116,7 @@ class DownloadInfo(BaseObject): class EventInfo(BaseObject): __slots__ = ['eventname', 'id', 'type', 'destination'] + def __init__(self, eventname=None, id=None, type=None, destination=None): self.eventname = eventname self.id = id @@ -120,6 +126,7 @@ class EventInfo(BaseObject): class FileData(BaseObject): __slots__ = ['fid', 'url', 'name', 'plugin', 'size', 'format_size', 'status', 'statusmsg', 'packageID', 'error', 'order'] + def __init__(self, fid=None, url=None, name=None, plugin=None, size=None, format_size=None, status=None, statusmsg=None, packageID=None, error=None, order=None): self.fid = fid self.url = url @@ -136,12 +143,14 @@ class FileData(BaseObject): class FileDoesNotExists(Exception): __slots__ = ['fid'] + def __init__(self, fid=None): self.fid = fid class InteractionTask(BaseObject): __slots__ = ['iid', 'input', 'structure', 'preset', 'output', 'data', 'title', 'description', 'plugin'] + def __init__(self, iid=None, input=None, structure=None, preset=None, output=None, data=None, title=None, description=None, plugin=None): self.iid = iid self.input = input @@ -156,6 +165,7 @@ class InteractionTask(BaseObject): class OnlineCheck(BaseObject): __slots__ = ['rid', 'data'] + def __init__(self, rid=None, data=None): self.rid = rid self.data = data @@ -163,6 +173,7 @@ class OnlineCheck(BaseObject): class OnlineStatus(BaseObject): __slots__ = ['name', 'plugin', 'packagename', 'status', 'size'] + def __init__(self, name=None, plugin=(None, None), packagename=None, status=None, size=None): self.name = name self.plugin = plugin @@ -173,6 +184,7 @@ class OnlineStatus(BaseObject): class PackageData(BaseObject): __slots__ = ['pid', 'name', 'folder', 'site', 'password', 'dest', 'order', 'linksdone', 'sizedone', 'sizetotal', 'linkstotal', 'links', 'fids'] + def __init__(self, pid=None, name=None, folder=None, site=None, password=None, dest=None, order=None, linksdone=None, sizedone=None, sizetotal=None, linkstotal=None, links=None, fids=None): self.pid = pid self.name = name @@ -191,12 +203,14 @@ class PackageData(BaseObject): class PackageDoesNotExists(Exception): __slots__ = ['pid'] + def __init__(self, pid=None): self.pid = pid class ServerStatus(BaseObject): __slots__ = ['pause', 'active', 'queue', 'total', 'speed', 'download', 'reconnect'] + def __init__(self, pause=None, active=None, queue=None, total=None, speed=None, download=None, reconnect=None): self.pause = pause self.active = active @@ -209,6 +223,7 @@ class ServerStatus(BaseObject): class ServiceCall(BaseObject): __slots__ = ['plugin', 'func', 'arguments', 'parseArguments'] + def __init__(self, plugin=None, func=None, arguments=None, parseArguments=None): self.plugin = plugin self.func = func @@ -218,6 +233,7 @@ class ServiceCall(BaseObject): class ServiceDoesNotExists(Exception): __slots__ = ['plugin', 'func'] + def __init__(self, plugin=None, func=None): self.plugin = plugin self.func = func @@ -225,12 +241,14 @@ class ServiceDoesNotExists(Exception): class ServiceException(Exception): __slots__ = ['msg'] + def __init__(self, msg=None): self.msg = msg class UserData(BaseObject): __slots__ = ['name', 'email', 'role', 'permission', 'templateName'] + def __init__(self, name=None, email=None, role=None, permission=None, templateName=None): self.name = name self.email = email @@ -239,143 +257,282 @@ class UserData(BaseObject): self.templateName = templateName class Iface(object): + def addFiles(self, pid, links): pass + + def addPackage(self, name, links, dest): pass + + def call(self, info): pass + + def checkOnlineStatus(self, urls): pass + + def checkOnlineStatusContainer(self, urls, filename, data): pass + + def checkURLs(self, urls): pass + + def deleteFiles(self, fids): pass + + def deleteFinished(self): pass + + def deletePackages(self, pids): pass + + def freeSpace(self): pass + + def generateAndAddPackages(self, links, dest): pass + + def generatePackages(self, links): pass + + def getAccountTypes(self): pass + + def getAccounts(self, refresh): pass + + def getAllInfo(self): pass + + def getAllUserData(self): pass + + def getCaptchaTask(self, exclusive): pass + + def getCaptchaTaskStatus(self, tid): pass + + def getCollector(self): pass + + def getCollectorData(self): pass + + def getConfig(self): pass + + def getConfigValue(self, category, option, section): pass + + def getEvents(self, uuid): pass + + def getFileData(self, fid): pass + + def getFileOrder(self, pid): pass + + def getInfoByPlugin(self, plugin): pass + + def getLog(self, offset): pass + + def getPackageData(self, pid): pass + + def getPackageInfo(self, pid): pass + + def getPackageOrder(self, destination): pass + + def getPluginConfig(self): pass + + def getQueue(self): pass + + def getQueueData(self): pass + + def getServerVersion(self): pass + + def getServices(self): pass + + def getUserData(self, username, password): pass + + def hasService(self, plugin, func): pass + + def isCaptchaWaiting(self): pass + + def isTimeDownload(self): pass + + def isTimeReconnect(self): pass + + def kill(self): pass + + def login(self, username, password): pass + + def moveFiles(self, fids, pid): pass + + def movePackage(self, destination, pid): pass + + def orderFile(self, fid, position): pass + + def orderPackage(self, pid, position): pass + + def parseURLs(self, html, url): pass + + def pauseServer(self): pass + + def pollResults(self, rid): pass + + def pullFromQueue(self, pid): pass + + def pushToQueue(self, pid): pass + + def recheckPackage(self, pid): pass + + def removeAccount(self, plugin, account): pass + + def restart(self): pass + + def restartFailed(self): pass + + def restartFile(self, fid): pass + + def restartPackage(self, pid): pass + + def setCaptchaResult(self, tid, result): pass + + def setConfigValue(self, category, option, value, section): pass + + def setPackageData(self, pid, data): pass + + def setPackageName(self, pid, name): pass + + def statusDownloads(self): pass + + def statusServer(self): pass + + def stopAllDownloads(self): pass + + def stopDownloads(self, fids): pass + + def togglePause(self): pass + + def toggleReconnect(self): pass + + def unpauseServer(self): pass + + def updateAccount(self, plugin, account, password, options): pass + + def uploadContainer(self, filename, data): pass -- cgit v1.2.3