358
edits
Line 414: | Line 414: | ||
: M for message entries | : M for message entries | ||
: N for notification entries | : N for notification entries | ||
====Notification Packet Format==== | |||
'''New File Notify:''' | |||
720 {int4 notify_packet_id} NOTIFICATION - NEW FILE | |||
{int4 fidlist}|{int2 reltype}|{int2 priority} | |||
* fidlist is a comma separated list of file ids | |||
* reltype is: 1 = anime, 2 = group, 3 = producer | |||
* priority is: 0 = low, 1 = medium, 2 = high | |||
* new file notifications are created as a batch, so it is not unusual to get several new files for a particular anime at once. It is in this case that a comma separated list of fids will be returned | |||
{{eyecatch|Note|Group (and producer) related file notifications are not implemented yet.}} | |||
'''New Private Message Notify:''' | |||
794 {int4 notify_packet_id} NOTIFICATION - NEW MESSAGE | |||
{int2 type}|{int4 date}|{int4 sent_by_uid}|{str sent_by_name}|{str subject}|{str body}|{int mid} | |||
* type is the type of the message (0=normal msg, 1=anonymous, 2=system msg, 3=mod msg) | |||
* date is the time the message was sent (in seconds since 1.1.1970) | |||
* sender uid/sender name are the user id and user name of the sender | |||
* subject is the message subject | |||
* body is message body (can be truncated) | |||
* mid is message id and can be used with NOTIFYACK | |||
'''Buddy Event Notify:''' | |||
753 {int4 notify_packet_id} NOTIFICATION - BUDDY | |||
{int4 buddy uid}|{int2 event type} | |||
* Possible event types: | |||
** 0 => LOGIN | |||
** 1 => LOGOUT | |||
** 2 => ACCEPTED | |||
** 3 => ADDED | |||
'''Going Down Event Notify:''' | |||
799 {int4 notify_packet_id} NOTIFICATION - SHUTTING DOWN | |||
{int4 time offline}|{int4 comment} | |||
* Clients with any notification on will receive the SHUTTING DOWN message before the API goes offline. | |||
* Time offline is the time in minutes the API will be down, 0 if indefinite (client can direct user to the AniDB site for status updates). | |||
* The comment is a short explanation for the downtime. | |||
* Only one datagram will be sent, and the server will not listen for replies. | |||
=== PUSHACK: UDP Notification Acknowledge === | |||
Used to acknowledge notification packets (720-799). A client must be prepared to issue this command before using '''PUSH'''. | |||
'''Command String:''' | |||
* PUSHACK nid={int4 notify_packet_id} | |||
'''Possible Replies:''' | |||
* 701 PUSHACK CONFIRMED | |||
* 702 NO SUCH PACKET PENDING | |||
'''Info:''' | |||
* See: '''PUSH''' | |||
== Buddy Commands == | == Buddy Commands == |