diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 17:28:58 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-17 17:28:58 +0200 |
commit | 938b7e6141e2895c7d41b0e8ef4b9416912e2e9e (patch) | |
tree | 6ceef0718139a13ced3fb607634fa60fc81212c4 /pyload/api | |
parent | Spare code cosmetics (3) (diff) | |
download | pyload-938b7e6141e2895c7d41b0e8ef4b9416912e2e9e.tar.xz |
Spare code cosmetics (4)
Diffstat (limited to 'pyload/api')
-rw-r--r-- | pyload/api/__init__.py | 1 | ||||
-rw-r--r-- | pyload/api/types.py | 25 |
2 files changed, 25 insertions, 1 deletions
diff --git a/pyload/api/__init__.py b/pyload/api/__init__.py index 62af70cf8..676e76d7b 100644 --- a/pyload/api/__init__.py +++ b/pyload/api/__init__.py @@ -38,7 +38,6 @@ permMap = {} # decorator only called on init, never initialized, so has no effect on runtime def permission(bits): class _Dec(object): - def __new__(cls, func, *args, **kwargs): permMap[func.__name__] = bits return func diff --git a/pyload/api/types.py b/pyload/api/types.py index 10a64a813..2fd089333 100644 --- a/pyload/api/types.py +++ b/pyload/api/types.py @@ -2,13 +2,16 @@ # Autogenerated by pyload # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + class BaseObject(object): __slots__ = [] + class Destination(object): Collector = 0 Queue = 1 + class DownloadStatus(object): Aborted = 9 Custom = 11 @@ -26,10 +29,12 @@ class DownloadStatus(object): Unknown = 14 Waiting = 5 + class ElementType(object): File = 1 Package = 0 + class Input(object): BOOL = 4 CHOICE = 6 @@ -42,11 +47,13 @@ class Input(object): TEXT = 1 TEXTBOX = 2 + class Output(object): CAPTCHA = 1 NOTIFICATION = 4 QUESTION = 2 + class AccountInfo(BaseObject): __slots__ = ['validuntil', 'login', 'options', 'valid', 'trafficleft', 'maxtraffic', 'premium', 'type'] @@ -61,6 +68,7 @@ class AccountInfo(BaseObject): self.premium = premium self.type = type + class CaptchaTask(BaseObject): __slots__ = ['tid', 'data', 'type', 'resultType'] @@ -71,6 +79,7 @@ class CaptchaTask(BaseObject): self.type = type self.resultType = resultType + class ConfigItem(BaseObject): __slots__ = ['name', 'description', 'value', 'type'] @@ -81,6 +90,7 @@ class ConfigItem(BaseObject): self.value = value self.type = type + class ConfigSection(BaseObject): __slots__ = ['name', 'description', 'items', 'outline'] @@ -91,6 +101,7 @@ class ConfigSection(BaseObject): self.items = items self.outline = outline + class DownloadInfo(BaseObject): __slots__ = ['fid', 'name', 'speed', 'eta', 'format_eta', 'bleft', 'size', 'format_size', 'percent', 'status', 'statusmsg', 'format_wait', 'wait_until', 'packageID', 'packageName', 'plugin'] @@ -113,6 +124,7 @@ class DownloadInfo(BaseObject): self.packageName = packageName self.plugin = plugin + class EventInfo(BaseObject): __slots__ = ['eventname', 'id', 'type', 'destination'] @@ -123,6 +135,7 @@ class EventInfo(BaseObject): self.type = type self.destination = destination + class FileData(BaseObject): __slots__ = ['fid', 'url', 'name', 'plugin', 'size', 'format_size', 'status', 'statusmsg', 'packageID', 'error', 'order'] @@ -140,6 +153,7 @@ class FileData(BaseObject): self.error = error self.order = order + class FileDoesNotExists(Exception): __slots__ = ['fid'] @@ -147,6 +161,7 @@ class FileDoesNotExists(Exception): def __init__(self, fid=None): self.fid = fid + class InteractionTask(BaseObject): __slots__ = ['iid', 'input', 'structure', 'preset', 'output', 'data', 'title', 'description', 'plugin'] @@ -162,6 +177,7 @@ class InteractionTask(BaseObject): self.description = description self.plugin = plugin + class OnlineCheck(BaseObject): __slots__ = ['rid', 'data'] @@ -170,6 +186,7 @@ class OnlineCheck(BaseObject): self.rid = rid self.data = data + class OnlineStatus(BaseObject): __slots__ = ['name', 'plugin', 'packagename', 'status', 'size'] @@ -181,6 +198,7 @@ class OnlineStatus(BaseObject): self.status = status self.size = size + class PackageData(BaseObject): __slots__ = ['pid', 'name', 'folder', 'site', 'password', 'dest', 'order', 'linksdone', 'sizedone', 'sizetotal', 'linkstotal', 'links', 'fids'] @@ -200,6 +218,7 @@ class PackageData(BaseObject): self.links = links self.fids = fids + class PackageDoesNotExists(Exception): __slots__ = ['pid'] @@ -207,6 +226,7 @@ class PackageDoesNotExists(Exception): def __init__(self, pid=None): self.pid = pid + class ServerStatus(BaseObject): __slots__ = ['pause', 'active', 'queue', 'total', 'speed', 'download', 'reconnect'] @@ -220,6 +240,7 @@ class ServerStatus(BaseObject): self.download = download self.reconnect = reconnect + class ServiceCall(BaseObject): __slots__ = ['plugin', 'func', 'arguments', 'parseArguments'] @@ -230,6 +251,7 @@ class ServiceCall(BaseObject): self.arguments = arguments self.parseArguments = parseArguments + class ServiceDoesNotExists(Exception): __slots__ = ['plugin', 'func'] @@ -238,6 +260,7 @@ class ServiceDoesNotExists(Exception): self.plugin = plugin self.func = func + class ServiceException(Exception): __slots__ = ['msg'] @@ -245,6 +268,7 @@ class ServiceException(Exception): def __init__(self, msg=None): self.msg = msg + class UserData(BaseObject): __slots__ = ['name', 'email', 'role', 'permission', 'templateName'] @@ -256,6 +280,7 @@ class UserData(BaseObject): self.permission = permission self.templateName = templateName + class Iface(object): def addFiles(self, pid, links): |