desc stringlengths 3 26.7k | decl stringlengths 11 7.89k | bodies stringlengths 8 553k |
|---|---|---|
'Return a valid 1xx warning header value describing the cache
adjustments.
The response is provided too allow warnings like 113
http://tools.ietf.org/html/rfc7234#section-5.5.4 where we need
to explicitly say response is over 24 hours old.'
| def warning(self, response):
| return '110 - "Response is Stale"'
|
'Update the response headers with any new headers.
NOTE: This SHOULD always include some Warning header to
signify that the response was cached by the client, not
by way of the provided headers.'
| def update_headers(self, response):
| return {}
|
'Send a request. Use the request information to see if it
exists in the cache and cache the response if we need to and can.'
| def send(self, request, **kw):
| if (request.method == 'GET'):
cached_response = self.controller.cached_request(request)
if cached_response:
return self.build_response(request, cached_response, from_cache=True)
request.headers.update(self.controller.conditional_headers(request))
resp = super(CacheControlAdap... |
'Build a response by making a request or using the cache.
This will end up calling send and returning a potentially
cached response'
| def build_response(self, request, response, from_cache=False):
| if ((not from_cache) and (request.method == 'GET')):
if (response.status == 304):
cached_response = self.controller.update_cached_response(request, response)
if (cached_response is not response):
from_cache = True
response.read(decode_content=False)
... |
'Normalize the URL to create a safe key for the cache'
| @classmethod
def _urlnorm(cls, uri):
| (scheme, authority, path, query, fragment) = parse_uri(uri)
if ((not scheme) or (not authority)):
raise Exception(('Only absolute URIs are allowed. uri = %s' % uri))
scheme = scheme.lower()
authority = authority.lower()
if (not path):
path = '/'
request_uri =... |
'Parse the cache control headers returning a dictionary with values
for the different directives.'
| def parse_cache_control(self, headers):
| retval = {}
cc_header = 'cache-control'
if ('Cache-Control' in headers):
cc_header = 'Cache-Control'
if (cc_header in headers):
parts = headers[cc_header].split(',')
parts_with_args = [tuple([x.strip().lower() for x in part.split('=', 1)]) for part in parts if ((-1) != part.find(... |
'Return a cached response if it exists in the cache, otherwise
return False.'
| def cached_request(self, request):
| cache_url = self.cache_url(request.url)
cc = self.parse_cache_control(request.headers)
no_cache = (True if ('no-cache' in cc) else False)
if (('max-age' in cc) and (cc['max-age'] == 0)):
no_cache = True
if no_cache:
return False
resp = self.serializer.loads(request, self.cache.ge... |
'Algorithm for caching requests.
This assumes a requests Response object.'
| def cache_response(self, request, response, body=None):
| if (response.status not in [200, 203, 300, 301]):
return
response_headers = CaseInsensitiveDict(response.headers)
cc_req = self.parse_cache_control(request.headers)
cc = self.parse_cache_control(response_headers)
cache_url = self.cache_url(request.url)
no_store = (cc.get('no-store') or c... |
'On a 304 we will get a new set of headers that we want to
update our cached value with, assuming we have one.
This should only ever be called when we\'ve sent an ETag and
gotten a 304 as the response.'
| def update_cached_response(self, request, response):
| cache_url = self.cache_url(request.url)
cached_response = self.serializer.loads(request, self.cache.get(cache_url))
if (not cached_response):
return response
excluded_headers = ['content-length']
cached_response.headers.update(dict(((k, v) for (k, v) in response.headers.items() if (k.lower()... |
'Login to AniDB UDP API
parameters:
username - your anidb username
password - your anidb password
nat - if this is 1, response will have "address" in attributes with your "ip:port" (default:0)
mtu - maximum transmission unit (max packet size) (default: 1400)'
| def auth(self, username, password, nat=None, mtu=None, callback=None):
| self.log('ok1')
if self.keepAlive:
self.log('ok2')
self._username = username
self._password = password
if (self.is_alive() == False):
self.log('You wanted to keep this thing alive!')
if (self._iamALIVE == False):
self.log(... |
'Log out from AniDB UDP API'
| def logout(self, cutConnection=False, callback=None):
| result = self.handle(LogoutCommand(), callback)
if cutConnection:
self.cut()
return result
|
'Subscribe/unsubscribe to/from notifications
parameters:
notify - Notifications about files added?
msg - Notifications about message added?
buddy - Notifications about buddy events?
structure of parameters:
notify msg [buddy]'
| def push(self, notify, msg, buddy=None, callback=None):
| return self.handle(PushCommand(notify, msg, buddy), callback)
|
'Acknowledge notification (do this when you get 271-274)
parameters:
nid - Notification packet id
structure of parameters:
nid'
| def pushack(self, nid, callback=None):
| return self.handle(PushAckCommand(nid), callback)
|
'Add a notification
parameters:
aid - Anime id
gid - Group id
type - Type of notification: type=> 0=all, 1=new, 2=group, 3=complete
priority - low = 0, medium = 1, high = 2 (unconfirmed)
structure of parameters:
[aid={int}|gid={int}]&type={int}&priority={int}'
| def notification(self, aid=None, gid=None, type=None, priority=None, callback=None):
| return self.handle(Notification(aid, gid, type, priority), callback)
|
'Add a notification
parameters:
aid - Anime id
gid - Group id
type - Type of notification: type=> 0=all, 1=new, 2=group, 3=complete
priority - low = 0, medium = 1, high = 2 (unconfirmed)
structure of parameters:
[aid={int}|gid={int}]&type={int}&priority={int}'
| def notifyadd(self, aid=None, gid=None, type=None, priority=None, callback=None):
| return self.handle(NotifyAddCommand(aid, gid, type, priority), callback)
|
'Add a notification
parameters:
aid - Anime id
gid - Group id
type - Type of notification: type=> 0=all, 1=new, 2=group, 3=complete
priority - low = 0, medium = 1, high = 2 (unconfirmed)
structure of parameters:
[aid={int}|gid={int}]&type={int}&priority={int}'
| def notifydel(self, aid=None, gid=None, type=None, priority=None, callback=None):
| return self.handle(NotifyDelCommand(aid, gid, type, priority), callback)
|
'Get number of pending notifications and messages
parameters:
buddy - Also display number of online buddies
structure of parameters:
[buddy]'
| def notify(self, buddy=None, callback=None):
| return self.handle(NotifyCommand(buddy), callback)
|
'List all pending notifications/messages'
| def notifylist(self, callback=None):
| return self.handle(NotifyListCommand(), callback)
|
'Get notification/message
parameters:
type - (M=message, N=notification)
id - message/notification id
structure of parameters:
type id'
| def notifyget(self, type, id, callback=None):
| return self.handle(NotifyGetCommand(type, id), callback)
|
'Mark message read or clear a notification
parameters:
type - (M=message, N=notification)
id - message/notification id
structure of parameters:
type id'
| def notifyack(self, type, id, callback=None):
| return self.handle(NotifyAckCommand(type, id), callback)
|
'Add a user to your buddy list
parameters:
uid - user id
uname - name of the user
structure of parameters:
(uid|uname)'
| def buddyadd(self, uid=None, uname=None, callback=None):
| return self.handle(BuddyAddCommand(uid, uname), callback)
|
'Remove a user from your buddy list
parameters:
uid - user id
structure of parameters:
uid'
| def buddydel(self, uid, callback=None):
| return self.handle(BuddyDelCommand(uid), callback)
|
'Accept user as buddy
parameters:
uid - user id
structure of parameters:
uid'
| def buddyaccept(self, uid, callback=None):
| return self.handle(BuddyAcceptCommand(uid), callback)
|
'Deny user as buddy
parameters:
uid - user id
structure of parameters:
uid'
| def buddydeny(self, uid, callback=None):
| return self.handle(BuddyDenyCommand(uid), callback)
|
'Retrieve your buddy list
parameters:
startat - number of buddy to start listing from
structure of parameters:
startat'
| def buddylist(self, startat, callback=None):
| return self.handle(BuddyListCommand(startat), callback)
|
'Retrieve buddy states
parameters:
startat - number of buddy to start listing from
structure of parameters:
startat'
| def buddystate(self, startat, callback=None):
| return self.handle(BuddyStateCommand(startat), callback)
|
'Get information about an anime
parameters:
aid - anime id
aname - name of the anime
amask - a bitfield describing what information you want about the anime
structure of parameters:
(aid|aname) [amask]
structure of amask:'
| def anime(self, aid=None, aname=None, amask=(-1), callback=None):
| return self.handle(AnimeCommand(aid, aname, amask), callback)
|
'Get information about an episode
parameters:
eid - episode id
aid - anime id
aname - name of the anime
epno - number of the episode
structure of parameters:
eid
(aid|aname) epno'
| def episode(self, eid=None, aid=None, aname=None, epno=None, callback=None):
| return self.handle(EpisodeCommand(eid, aid, aname, epno), callback)
|
'Get information about a file
parameters:
fid - file id
size - size of the file
ed2k - ed2k-hash of the file
aid - anime id
aname - name of the anime
gid - group id
gname - name of the group
epno - number of the episode
fmask - a bitfield describing what information you want about the file
am... | def file(self, fid=None, size=None, ed2k=None, aid=None, aname=None, gid=None, gname=None, epno=None, fmask=(-1), amask=0, callback=None):
| return self.handle(FileCommand(fid, size, ed2k, aid, aname, gid, gname, epno, fmask, amask), callback)
|
'Get information about a group
parameters:
gid - group id
gname - name of the group
structure of parameters:
(gid|gname)'
| def group(self, gid=None, gname=None, callback=None):
| return self.handle(GroupCommand(gid, gname), callback)
|
'Returns a list of group names and ranges of episodes released by the group for a given anime.
parameters:
aid - anime id
state - If state is not supplied, groups with a completion state of \'ongoing\', \'finished\', or \'complete\' are returned
state values:
1 -> ongoing
2 -> stalled
3 -> complete
4 -> dropped
5 ->... | def groupstatus(self, aid=None, state=None, callback=None):
| return self.handle(GroupstatusCommand(aid, state), callback)
|
'Get information about a producer
parameters:
pid - producer id
pname - name of the producer
structure of parameters:
(pid|pname)'
| def producer(self, pid=None, pname=None, callback=None):
| return self.handle(ProducerCommand(pid, pname), callback)
|
'Get information about your mylist
parameters:
lid - mylist id
fid - file id
size - size of the file
ed2k - ed2k-hash of the file
aid - anime id
aname - name of the anime
gid - group id
gname - name of the group
epno - number of the episode
structure of parameters:
lid
fid
size ed2k
(aid|anam... | def mylist(self, lid=None, fid=None, size=None, ed2k=None, aid=None, aname=None, gid=None, gname=None, epno=None, callback=None):
| return self.handle(MyListCommand(lid, fid, size, ed2k, aid, aname, gid, gname, epno), callback)
|
'Add/Edit information to/in your mylist
parameters:
lid - mylist id
fid - file id
size - size of the file
ed2k - ed2k-hash of the file
aid - anime id
aname - name of the anime
gid - group id
gname - name of the group
epno - number of the episode
edit - whether to add to mylist or edit an e... | def mylistadd(self, lid=None, fid=None, size=None, ed2k=None, aid=None, aname=None, gid=None, gname=None, epno=None, edit=None, state=None, viewed=None, source=None, storage=None, other=None, callback=None):
| return self.handle(MyListAddCommand(lid, fid, size, ed2k, aid, aname, gid, gname, epno, edit, state, viewed, source, storage, other), callback)
|
'Delete information from your mylist
parameters:
lid - mylist id
fid - file id
size - size of the file
ed2k - ed2k-hash of the file
aid - anime id
aname - name of the anime
gid - group id
gname - name of the group
epno - number of the episode
structure of parameters:
lid
fid
(aid|aname) (gid|... | def mylistdel(self, lid=None, fid=None, aid=None, aname=None, gid=None, gname=None, epno=None, callback=None):
| return self.handle(MyListCommand(lid, fid, aid, aname, gid, gname, epno), callback)
|
'Get summary information of your mylist'
| def myliststats(self, callback=None):
| return self.handle(MyListStatsCommand(), callback)
|
'Rate an anime/episode/group
parameters:
type - type of the vote
id - anime/group id
name - name of the anime/group
value - the vote
epno - number of the episode
structure of parameters:
type (id|name) [value] [epno]
structure of type:
value meaning
1 rate an anime (episode if you also specify epno... | def vote(self, type, id=None, name=None, value=None, epno=None, callback=None):
| return self.handle(VoteCommand(type, id, name, value, epno), callback)
|
'Get information of random anime
parameters:
type - where to take the random anime
structure of parameters:
type
structure of type:
value meaning
0 db
1 watched
2 unwatched
3 mylist'
| def randomanime(self, type, callback=None):
| return self.handle(RandomAnimeCommand(type), callback)
|
'Test connectivity to AniDB UDP API'
| def ping(self, callback=None):
| return self.handle(PingCommand(), callback)
|
'Encrypt all future traffic
parameters:
user - your username
apipassword - your api password
type - type of encoding (1=128bit AES)
structure of parameters:
user [type]'
| def encrypt(self, user, apipassword, type=None, callback=None):
| return self.handle(EncryptCommand(user, apipassword, type), callback)
|
'Change encoding used in messages
parameters:
name - name of the encoding
structure of parameters:
name
comments:
DO NOT USE THIS!
utf8 is the only encoding which will support all the text in anidb responses
the responses have japanese, russian, french and probably other alphabets as well
even if you can\'t display ... | def encoding(self, name, callback=None):
| raise AniDBStupidUserError, "pylibanidb sets the encoding to utf8 as default and it's stupid to use any other encoding. you WILL lose some data if you use other encodings, and now you've been warned. you will need ... |
'Send message
parameters:
to - name of the user you want as the recipient
title - title of the message
body - the message
structure of parameters:
to title body'
| def sendmsg(self, to, title, body, callback=None):
| return self.handle(SendMsgCommand(to, title, body), callback)
|
'Retrieve user id
parameters:
user - username of the user
structure of parameters:
user'
| def user(self, user, callback=None):
| return self.handle(UserCommand(user), callback)
|
'Retrieve server uptime'
| def uptime(self, callback=None):
| return self.handle(UptimeCommand(), callback)
|
'Retrieve server version'
| def version(self, callback=None):
| return self.handle(VersionCommand(), callback)
|
'type - Type of notification: type=> 0=all, 1=new, 2=group, 3=complete
priority - low = 0, medium = 1, high = 2 (unconfirmed)'
| def add_notification(self):
| if self.aid:
self.aniDB.notifyadd(aid=self.aid, type=1, priority=1)
|
'type - Type of notification: type=> 0=all, 1=new, 2=group, 3=complete
priority - low = 0, medium = 1, high = 2 (unconfirmed)'
| def del_notification(self):
| if self.aid:
self.aniDB.notifydel(aid=self.aid, type=1, priority=1)
|
'load the data from anidb'
| def load_data(self):
| if (not (self.name or self.aid)):
raise ValueError
self.rawData = self.aniDB.anime(aid=self.aid, aname=self.name, amask=self.bitCode)
if self.rawData.datalines:
self._fill(self.rawData.datalines[0])
self._builPreSequal()
self.laoded = True
|
'load the data from anidb'
| def load_data(self):
| if (self.filePath and (not (self.ed2k or self.size))):
(self.ed2k, self.size) = self._calculate_file_stuff(self.filePath)
self.rawData = self.aniDB.file(fid=self.fid, size=self.size, ed2k=self.ed2k, aid=self.aid, aname=None, gid=None, gname=None, epno=self.epno, fmask=self.bitCodeF, amask=self.bitCodeA)... |
'status:
0 unknown - state is unknown or the user doesn\'t want to provide this information (default)
1 on hdd - the file is stored on hdd
2 on cd - the file is stored on cd
3 deleted - the file has been deleted or is not available for other reasons (i.e. reencoded)'
| def add_to_mylist(self, status=None):
| if (self.filePath and (not (self.ed2k or self.size))):
(self.ed2k, self.size) = self._calculate_file_stuff(self.filePath)
try:
self.aniDB.mylistadd(size=self.size, ed2k=self.ed2k, state=status)
except Exception as e:
self.log((u'exception msg: ' + str(e)))
else:
sel... |
'Return an hex string with the correct bit set corresponding to the wanted fields in the map'
| def _getBitChain(self, map, wanted):
| bit = 0
for (index, field) in enumerate(map):
if ((field in wanted) and (not (field in self.blacklist))):
bit = (bit ^ (1 << ((len(map) - index) - 1)))
bit = str(hex(bit)).lstrip('0x').rstrip('L')
bit = (''.join(['0' for unused in xrange(((len(map) / 4) - len(bit)))]) + bit)
retu... |
'Returns a list with the corresponding fields as set in the bitChain (hex string)'
| def _getCodes(self, map, bitChain):
| codeList = []
bitChain = int(bitChain, 16)
mapLength = len(map)
for i in reversed(range(mapLength)):
if (bitChain & (2 ** i)):
codeList.append(map[((mapLength - i) - 1)])
return codeList
|
'attributes:
sesskey - session key
address - your address (ip:port) as seen by the server
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'LOGIN_ACCEPTED'
self.codetail = ()
self.coderep = ()
nat = cmd.parameters['nat']
nat = int((((nat == None) and nat) or '0'))
if nat:
self.codehead = ('sesskey', 'address')
else:
self.codehead... |
'attributes:
sesskey - session key
address - your address (ip:port) as seen by the server
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'LOGIN_ACCEPTED_NEW_VER'
self.codetail = ()
self.coderep = ()
nat = cmd.parameters['nat']
nat = int((((nat == None) and nat) or '0'))
if nat:
self.codehead = ('sesskey', 'address')
else:
self.... |
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'LOGGED_OUT'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'RESOURCE'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'STATS'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'TOP'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:
uptime - udpserver uptime in milliseconds'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'UPTIME'
self.codehead = ()
self.codetail = ('uptime',)
self.coderep = ()
|
'attributes:
salt - salt
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'ENCRYPTION_ENABLED'
self.codehead = ('salt',)
self.codetail = ()
self.coderep = ()
|
'attributes:
data:
entrycnt - number of entries added'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'MYLIST_ENTRY_ADDED'
self.codehead = ()
self.codetail = ('entrycnt',)
self.coderep = ()
|
'attributes:
data:
entrycnt - number of entries'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'MYLIST_ENTRY_DELETED'
self.codehead = ()
self.codetail = ('entrycnt',)
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'ADDED_FILE'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'ADDED_STREAM'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'ENCODING_CHANGED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:
eid episode id
gid group id
lid mylist id
state state
size size
ed2k ed2k
md5 md5
sha1 sha1
crc32 crc32
dublang dub language
sublang sub language
quality quality
source ... | def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'FILE'
self.codehead = ()
self.coderep = ()
fmask = cmd.parameters['fmask']
amask = cmd.parameters['amask']
codeListF = self.maper.getFileCodesF(fmask)
codeListA = self.maper.getFileCodesA(amask)
self.cod... |
'attributes:
data:
lid - mylist id
fid - file id
eid - episode id
aid - anime id
gid - group id
date - date when you added this to mylist
state - the location of the file
viewdate - date when you marked this watched
storage - for example the title of the cd you have this on
source - w... | def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'MYLIST'
self.codehead = ()
self.codetail = ('lid', 'fid', 'eid', 'aid', 'gid', 'date', 'state', 'viewdate', 'storage', 'source', 'other')
self.coderep = ()
|
'attributes:
data:
animes - animes
eps - eps
files - files
filesizes - size of files
animesadded - added animes
epsadded - added eps
filesadded - added files
groupsadded - added groups
leechperc - leech %
lameperc - lame %
viewedofdb - viewed % ... | def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'MYLIST_STATS'
self.codehead = ()
self.codetail = ('animes', 'eps', 'files', 'filesizes', 'animesadded', 'epsadded', 'filesadded', 'groupsadded', 'leechperc', 'lameperc', 'viewedofdb', 'mylistofdb', 'viewedofmylist', 'viewed... |
'attributes:
data:
nid - notification id
unknown - unsure what this parameter is
type - Type of notification: type=> 0=all, 1=new, 2=group, 3=complete
aid - anime id
priority - low = 0, medium = 1, high = 2 (unconfirmed)
date - date notification subscribed to'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION'
self.codehead = ()
self.codetail = ('nid', 'unknown', 'type', 'aid', 'priority', 'date')
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'ANIME_BEST_MATCH'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'RANDOMANIME'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:
eid - episode id
aid - anime id
length - length
rating - rating
votes - votes
epno - number of episode
name - english name of episode
romaji - romaji name of episode
kanji - kanji name of episode'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'EPISODE'
self.codehead = ()
self.codetail = ('eid', 'aid', 'length', 'rating', 'votes', 'epno', 'name', 'romaji', 'kanji')
self.coderep = ()
|
'attributes:
data:
pid - producer id
name - name of producer
shortname - short name
othername - other name
type - type
pic - picture name
url - home page url'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'PRODUCER'
self.codehead = ()
self.codetail = ('pid', 'name', 'shortname', 'othername', 'type', 'pic', 'url')
self.coderep = ()
|
'attributes:
data:
gid - group id
rating - rating
votes - votes
animes - anime count
files - file count
name - name
shortname - short
ircchannel - irc channel
ircserver - irc server
url - url'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'GROUP'
self.codehead = ()
self.codetail = ('gid', 'rating', 'votes', 'animes', 'files', 'name', 'shortname', 'ircchannel', 'ircserver', 'url')
self.coderep = ()
|
'attributes:
data:
gid - group id
rating - rating
votes - votes
animes - anime count
files - file count
name - name
shortname - short
ircchannel - irc channel
ircserver - irc server
url - url'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'GROUPSTATUS'
self.codehead = ()
self.codetail = ('gid', 'name', 'state', ' last_episode_number', 'rating', 'votes', 'episode_range')
self.coderep = ()
|
'attributes:
start - mylist entry number of first buddy on this packet
end - mylist entry number of last buddy on this packet
total - total number of buddies on mylist
data:
uid - uid
name - username
state - state'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'BUDDY_LIST'
self.codehead = ('start', 'end', 'total')
self.codetail = ('uid', 'username', 'state')
self.coderep = ()
|
'attributes:
start - mylist entry number of first buddy on this packet
end - mylist entry number of last buddy on this packet
total - total number of buddies on mylist
data:
uid - uid
state - online state'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'BUDDY_STATE'
self.codehead = ('start', 'end', 'total')
self.codetail = ('uid', 'state')
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'BUDDY_ADDED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'BUDDY_DELETED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'BUDDY_ACCEPTED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'BUDDY_DENIED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:
name - aname/ename/gname'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'VOTED'
self.codehead = ()
self.codetail = ('name',)
self.coderep = ()
|
'attributes:
data:
name - aname/ename/gname
value - vote value'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'VOTE_FOUND'
self.codehead = ()
self.codetail = ('name', 'value')
self.coderep = ()
|
'attributes:
data:
name - aname/ename/gname
value - vote value'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'VOTE_UPDATED'
self.codehead = ()
self.codetail = ('name', 'value')
self.coderep = ()
|
'attributes:
data:
name - aname/ename/gname
value - vote value'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'VOTE_REVOKED'
self.codehead = ()
self.codetail = ('name', 'value')
self.coderep = ()
|
'attributes:
data:
nid - notofication id'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_ITEM_ADDED'
self.codehead = ()
self.codetail = 'nid'
self.coderep = ()
|
'attributes:
data:
nid - notofication id'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_ITEM_DELETED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:
nid - notofication id'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_ITEM_UPDATED'
self.codehead = ()
self.codetail = 'nid'
self.coderep = ()
|
'attributes:
data:
nid - notification id
type -
priority -'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'MULTIPLE NOTIFICATION ITEMS'
self.codehead = ()
self.codetail = ()
self.coderep = ('nid', 'type', 'priority')
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_ENABLED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
nid - notify packet id
data:
aid - anime id
date - date
count - count
name - name of the anime'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_NOTIFY'
self.codehead = ('nid',)
self.codetail = ('aid', 'date', 'count', 'name')
self.coderep = ()
|
'attributes:
nid - notify packet id
data:
type - type
date - date
uid - user id of the sender
name - name of the sender
subject - subject'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_MESSAGE'
self.codehead = ('nid',)
self.codetail = ('type', 'date', 'uid', 'name', 'subject')
self.coderep = ()
|
'attributes:
nid - notify packet id
data:
uid - buddy uid
type - event type'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_BUDDY'
self.codehead = ('notify_packet_id',)
self.codetail = ('uid', 'type')
self.coderep = ()
|
'attributes:
nid - notify packet id
data:
time - time offline
comment - comment'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION_SHUTDOWN'
self.codehead = ('nid',)
self.codetail = ('time', 'comment')
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'PUSHACK_CONFIRMED'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFYACK_SUCCESSFUL_M'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFYACK_SUCCESSFUL_N'
self.codehead = ()
self.codetail = ()
self.coderep = ()
|
'attributes:
data:
notifies - pending notifies
msgs - pending msgs
buddys - number of online buddys'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFICATION'
self.codehead = ()
self.coderep = ()
buddy = cmd.parameters['buddy']
buddy = int((((buddy != None) and buddy) or '0'))
if buddy:
self.codetail = ('notifies', 'msgs', 'buddys')
else:
... |
'attributes:
data:
type - type
nid - notify id'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFYLIST'
self.codehead = ()
self.codetail = ('type', 'nid')
self.coderep = ()
|
'attributes:
data:
nid - notify id
uid - from user id
uname - from username
date - date
type - type
title - title
body - body'
| def __init__(self, cmd, restag, rescode, resstr, datalines):
| Response.__init__(self, cmd, restag, rescode, resstr, datalines)
self.codestr = 'NOTIFYGET_MESSAGE'
self.codehead = ()
self.codetail = ('nid', 'uid', 'uname', 'date', 'type', 'title', 'body')
self.coderep = ()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.