UDP API Definition: Difference between revisions

Jump to navigation Jump to search
(0.03b)
Line 150: Line 150:
=== AUTH: Authing to the AnimeDB ===
=== AUTH: Authing to the AnimeDB ===
'''Command String:'''
'''Command String:'''
* AUTH user={str username}&pass={str password}&protover={int4 apiversion}&client={str clientname}&clientver={int4 clientversion}[&nat=1]
* AUTH user={str username}&pass={str password}&protover={int4 apiversion}&client={str clientname}&clientver={int4 clientversion}[&nat=1&comp=1&enc={str encoding}&mtu{int4 mtu value}]


'''Possible Replies:'''
'''Possible Replies:'''
Line 197: Line 197:
* The 'nat' option makes the client able to detect whether it is behind a nat router or not. When the client is behind a nat router it should keep the "connection" alive with the PING command.
* The 'nat' option makes the client able to detect whether it is behind a nat router or not. When the client is behind a nat router it should keep the "connection" alive with the PING command.
{{eyecatch|IMPORTANT:| Make sure your client handels ALL possible AUTH return codes before giving out any versions!}}
{{eyecatch|IMPORTANT:| Make sure your client handels ALL possible AUTH return codes before giving out any versions!}}
* When ''enc=x'' is defined the server will change the encoding used to x.
**If the encoding is supported it will change right away (including the response) and be reset on logout/timeout.
**If not supported then the argument will be silently ignored. Use ENCODING to test what works.
**Supported encodings are [http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html these].
* ''comp=1'' means that the client supports compression ([http://java.sun.com/j2se/1.5.0/docs/api/java/util/zip/Deflater.html DEFLATE]).
**The server will compress (instead of truncating) the datagrams when needed if this option is enabled.
**The first two bytes of compressed datagrams will always be set to zero. (So tags should never start with that.)
* Default [http://en.wikipedia.org/wiki/MTU_(networking) ''mtu''] is 1400. Min = 400, Max = 1400.


----
----
Line 226: Line 234:
=== PUSH: UDP Notification Registration ===
=== PUSH: UDP Notification Registration ===
'''Command String:'''
'''Command String:'''
* PUSH notify={bool push_file_added_notifications}&msg={bool push_msg_added_notifications}
* PUSH notify={bool push_file_added_notifications}&msg={bool push_msg_added_notifications}[&buddy={bool push_buddy_event_notifications}]


'''Possible Replies:'''
'''Possible Replies:'''
Line 239: Line 247:
* On recieving any of the above packets the client has to issue a PUSHACK command with the notify_packet_id provided in the notification packet.
* On recieving any of the above packets the client has to issue a PUSHACK command with the notify_packet_id provided in the notification packet.


'''Notification Packet Format:'''
====Notification Packet Format====
* File Added Notify:
'''File Added Notify:'''


   271 {int4 notify_packet_id} NOTIFICATION
   271 {int4 notify_packet_id} NOTIFICATION
   {int4 aid}|{int4 date}|{int4 count}|{str animetitle}
   {int4 aid}|{int4 date}|{int4 count}|{str animetitle}


: aid is the id of the affected anime
* aid is the id of the affected anime
: date is the time of the event (in seconds since 1.1.1970)
* date is the time of the event (in seconds since 1.1.1970)
: count is the number of events pending for this anime
* count is the number of events pending for this anime
: animetitle is the name of the affected anime
* animetitle is the name of the affected anime


* Message Added Notify:
'''Message Added Notify:'''


   272 {int4 notify_packet_id} NOTIFICATION
   272 {int4 notify_packet_id} NOTIFICATION
   {int2 type}|{int4 date}|{int4 senderuid}|{str sendername}|{str subject}
   {int2 type}|{int4 date}|{int4 senderuid}|{str sendername}|{str subject}


: type is the type of the message (0=normal msg, 1=annonymous, 2=system msg, 3=mod msg)
* type is the type of the message (0=normal msg, 1=annonymous, 2=system msg, 3=mod msg)
: date is the time the message was sent (in seconds since 1.1.1970)
* date is the time the message was sent (in seconds since 1.1.1970)
: senderuid/sendername are the user id and username of the sender
* senderuid/sendername are the user id and username of the sender
: subject is the message subject
* subject is the message subject
 
'''Buddy Event Notify:'''
  273 {int4 notify_packet_id} NOTIFICATION
  {int4 buddy uid}|{int2 event type}
* Possible event types:
** 0 => LOGIN
** 1 => LOGOUT
** 2 => ACCEPTED
** 3 => ADDED
 
'''Going Down Event Notify:'''
  274 {int4 notify_packet_id} NOTIFICATION
  {int4 time offline}|{int4 comment}


* Clients with any notification on will receive the GOINGDOWN 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.
----
----


Line 277: Line 302:
=== NOTIFY: Notifications ===
=== NOTIFY: Notifications ===
'''Command String:'''
'''Command String:'''
* NOTIFY
* NOTIFY [buddy=1]


'''Possible Replies:'''
'''Possible Replies:'''
* 290 NOTIFICATION
* 290 NOTIFICATION
: {int4 pending_notifies}|{int4 pending_msgs}
: {int4 pending_notifies}|{int4 pending_msgs}
when ''buddy=1''
* 290 NOTIFICATION
: {int4 pending_notifies}|{int4 pending_msgs}|{int4 number_of_online_buddys}


'''Info:'''
'''Info:'''
* This command only works if you are logged in.
* This command only works if you are logged in.
* pending_notifies number of animes which have pending notifications for this user.
* ''pending_notifies'' is the number of animes which have pending notifications for this user.
* pending_msgs number of unread anidb messages for this user.
* ''pending_msgs'' is the number of unread anidb messages for this user.
* A client which has registered to recieve UDP notification packets should issue this command once every 30 minutes to keep the connection alive and to ensure that it has not been logged out by the API server yet.
* A client which has registered to recieve UDP notification packets should issue this command once every 30 minutes to keep the connection alive and to ensure that it has not been logged out by the API server yet.
* If the client did send a NOTIFY within the last 35 minutes and it was confirmed by AniDB then recieving a 501 LOGIN FIRST message for the next NOTIFY command shows that AniDB logged the client out because it did not respond to a PUSH Notification packet.
* If the client did send a NOTIFY within the last 35 minutes and it was confirmed by AniDB then recieving a 501 LOGIN FIRST message for the next NOTIFY command shows that AniDB logged the client out because it did not respond to a PUSH Notification packet.
Line 363: Line 391:
: M for message entries
: M for message entries
: N for notification entries
: N for notification entries
== Buddy Commands ==
Group of commands used to administrate your buddylist.
=== BUDDYADD ===
'''Command String:'''
* BUDDYADD uid={int4 buddy uid}
* BUDDYADD uname={int4 buddy name}
'''Possible Replies:'''
* 394 NO SUCH USER
* 255 BUDDY ADDED
* 355 BUDDY ALREADY ADDED
----
=== BUDDYDEL ===
'''Command String:'''
* BUDDYDEL uid={int4 buddy uid}
'''Possible Replies:'''
* 356 NO SUCH BUDDY
* 256 BUDDY DELETED
----
=== BUDDYACCEPT ===
'''Command String:'''
* BUDDYACCEPT uid={int4 user uid}
'''Possible Replies:'''
* 356 NO SUCH BUDDY
* 257 BUDDY ACCEPTED
* 357 BUDDY ALREADY ACCEPTED
----
=== BUDDYDENY ===
'''Command String:'''
* BUDDYDENY uid={int4 buddy uid}
'''Possible Replies:'''
* 394 NO SUCH USER
* 258 BUDDY DENIED
* 358 BUDDY ALREADY DENIED
----
=== BUDDYLIST ===
'''Command String:'''
* BUDDYLIST startat={int2 start at #}
'''Possible Replies:'''
* 253 {int2 start} {int2 end} {int2 total} BUDDY LIST
: {int4 uid}|{str username}|{int2 state}
: ...
'''Info:'''
* state is a 16bit bit field in integer notation (lowest bit first):
  * bit 1 = this user is in your buddylist
  * bit 2 = this user has accepted you
  * bit 3 = this user is waiting for your approval
----
=== BUDDYSTATE ===
'''Command String:'''
* BUDDYSTATE startat={int2 start at #}
'''Possible Replies:'''
* 254 {int2 start} {int2 end} {int2 total} BUDDY STATE
: {int4 uid}|{int2 onlinestate}
: ...
'''Info:'''
* onlinestate is a 16bit bit field in integer notation (lowest bit first):
  * bit 1 = http online (user has issued a HTTP request within the last 10 minutes)
  * bit 2 = udp api online (user is currently connected to the udp api server)
  * example: 0=offline, 1=http online, 2=udp api online, 3=http&udp api online


== Data Commands ==
== Data Commands ==
Line 368: Line 468:
'''Command String:'''<br>
'''Command String:'''<br>
by aid
by aid
* ANIME aid={int4 id}
* ANIME aid={int4 id}[&acode={int4}]
by name
by name
* ANIME aname={str anime name}
* ANIME aname={str anime name}[&acode={int4}]


'''Possible Replies:'''
'''Possible Replies:'''
Line 383: Line 483:
* By name: must be perfect match of romaji/kanji/english/other/synonym/short name.
* By name: must be perfect match of romaji/kanji/english/other/synonym/short name.
* NOTE: The category list is the first data to be truncated if needed. And then: synonym list, short name list. This applies for the FILE command too.
* NOTE: The category list is the first data to be truncated if needed. And then: synonym list, short name list. This applies for the FILE command too.
'''acode:'''
{| cellpadding="0" align="center"
! width="40"|Bit
! width="80"|Decimal
! width="160"|Data field
! width="50"|-
! width="40"|Bit
! width="120"|Decimal
! width="160"|Data field
|- style="background-color: #eee;"
|0 ||1 || int4 aid || || 16 || 65536 || str url
|-
|1 ||2 || int4 episodes || || 17 || 131072 || str picname
|- style="background-color: #eee;"
|2 ||4 || int4 normal ep count || || 18 || 262144 || str year
|-
|3 ||8 || int4 special ep count ||  || 19 || 524288 || str type
|- style="background-color: #eee;"
|4 ||16 || int4 rating || || 20 || 1048576 || str romaji name
|-
|5 ||32 || int4 vote count || || 21 || 2097152 || str kanji name
|- style="background-color: #eee;"
|6 ||64 || int4 temp rating || || 22 || 4194304 || str english name
|-
|7 ||128 || int4 temp vote count || || 23 || 8388608 || str other name
|- style="background-color: #eee;"
|8 ||256 || int4 average review rating || || 24 || 16777216 || str short name list
|-
|9 ||512 || int4 review count || || 25 || 33554432 || str synonym list
|- style="background-color: #eee;"
|10 ||1024 || int4 air date || || 26 || 67108864 || str category list
|-
|11 ||2048 || int4 end date || || 27 || 134217728 || str related aid list
|- style="background-color: #eee;"
|12 ||4096 || int4 anime planet id || || 28 || 268435456 || str producer name list
|-
|13 ||8192 || int4 anime news network id || || 29 || 536870912 || str producer id list
|- style="background-color: #eee;"
|14 ||16384 || int4 allcinema id || || 30 || 1073741824 || str award list
|-
|15 ||32768 || str animenfo id || || 31 || -2147483648 || reserved (all)
|}


'''Examples:''' (html escaped code intended)
'''Examples:''' (html escaped code intended)
Line 421: Line 564:


----
----
=== GROUP: Retrieve Group Data ===
'''Command String:'''<br>
by gid
* GROUP gid={int4 gid}
by name/shortname
* GROUP gname={str group name}
'''Possible Replies:'''
* 250 GROUP
: {int4 gid}|{int4 rating}|{int4 votes}|{int4 acount}|{int fcount}|{str name}|{str short}|{str irc channel}|{str irc server}|{str url}
* 350 NO SUCH GROUP
'''Examples:'''
  > GROUP gid=1&s=xxxxx
  < 250 GROUP
  41|851|665|109|1004|Zhentarim DivX|zx|#zhentarim|irc.chatsociety.net|http://www.zhentarim.net/
  > GROUP gname=a-l&s=xxxxx
  < 250 GROUP
  566|840|453|53|534|Anime-Legion|A-L|#anime-legion|irc.irchighway.net|http://www.anime-legion.net
----
=== FILE: Retrieve File Data ===
=== FILE: Retrieve File Data ===
'''Command String:'''<br>
'''Command String:'''<br>
Line 461: Line 581:
* 220 FILE
* 220 FILE
: {int4 fid}|...(data list)
: {int4 fid}|...(data list)
* 322 MULTIPLE FILES FOUND
: {int4 fid 0}|{int4 fid 1}|...|{int4 fid n}
* 320 NO SUCH FILE
* 320 NO SUCH FILE


Line 529: Line 651:
|13 ||8192 || str crc32 || || 29 || 536870912 || not used
|13 ||8192 || str crc32 || || 29 || 536870912 || not used
|- style="background-color: #eee;"
|- style="background-color: #eee;"
|14 ||16384 || not used || || 30 || 1073741824 || not used
|14 ||16384 || not used || || 30 || 1073741824 || str anidb file name
|-
|-
|15 ||32768 || not used || || 31 || -2147483648 || not used
|15 ||32768 || not used || || 31 || -2147483648 || not used
Line 589: Line 711:
15459|782|8772|380|1|171298816|2c8a3b53d94d8579b9b81941c549e108|Narutaru - 02 - Catastrophe During the Daytime - [Triad & AonE].avi
15459|782|8772|380|1|171298816|2c8a3b53d94d8579b9b81941c549e108|Narutaru - 02 - Catastrophe During the Daytime - [Triad & AonE].avi
</pre>
</pre>
----
=== GROUP: Retrieve Group Data ===
'''Command String:'''<br>
by gid
* GROUP gid={int4 gid}
by name/shortname
* GROUP gname={str group name}
'''Possible Replies:'''
* 250 GROUP
: {int4 gid}|{int4 rating}|{int4 votes}|{int4 acount}|{int fcount}|{str name}|{str short}|{str irc channel}|{str irc server}|{str url}
* 350 NO SUCH GROUP
'''Examples:'''
  > GROUP gid=1&s=xxxxx
  < 250 GROUP
  41|851|665|109|1004|Zhentarim DivX|zx|#zhentarim|irc.chatsociety.net|http://www.zhentarim.net/
  > GROUP gname=a-l&s=xxxxx
  < 250 GROUP
  566|840|453|53|534|Anime-Legion|A-L|#anime-legion|irc.irchighway.net|http://www.anime-legion.net
----
=== PRODUCER ===
'''Command String:'''<br>
by id
* PRODUCER pid={int4 producer id}
by name
* PRODUCER pname={str producer name/short name/other name}
'''Possible Replies:'''
* 245 PRODUCER
: {int4 id}|{str name}|{str short name}|{str other name}|{str type}|{str picture name}|{str home page url}
* 345 NO SUCH PRODUCER
'''Example:'''
  > PRODUCER pid=1
  < 245 PRODUCER
  1|GAINAX||ガイナックス|Company|1088.gif|http://www.gainax.co.jp/


== Mylist Commands ==
== Mylist Commands ==
Line 763: Line 924:
* May be used by a frontend to determine if the API is still available.
* May be used by a frontend to determine if the API is still available.
* May be executed even if not yet logged in.
* May be executed even if not yet logged in.
----
=== ENCRYPT ===
Will cause all future messages from the server, except the first (the reply to the ENCRYPT command itself), to be encrypted (128 bit [http://en.wikipedia.org/wiki/Advanced_Encryption_Standard AES]). The client will also have to encrypt all future requests sent to the server. All non-encrypted messages will be discarded by the server. The encryption key is the [http://en.wikipedia.org/wiki/MD5 MD5] hash of a special ''API Password'' (defined in the users profile) concatenated with the salt string as given in the reply to the ENCRYPT message. A normal AUTH message is still necessary to authenticate and should follow the ENCRYPT command once the API has acknowledged the encryption.
'''Command String:'''
* ENCRYPT user={str name}[&type={int2 type}]
'''Possible Replies:'''
* 209 {str salt} ENCRYPTION ENABLED
* 309 API PASSWORD NOT DEFINED
* 509 NO SUCH ENCRYPTION TYPE
* 394 NO SUCH USER
'''Info:'''
* ''user'' is the user name.
* ''type'' is the type of encryption; 1 => 128 bit AES (only one defined).
* ''API Password'' is the one defined in the profile settings [http://anidb.info/perl-bin/animedb.pl?show=profile page].
* It is not possible to disable the encryption once enabled while staying logged in.
** A logout (the logout message needs to be correctly encrypted) or timeout will disable the encryption.
* In order to minimize server load, encryption should be disabled by default and should have to be enabled manually by the user in the configuration options.
* The encryption key is md5(api_password_of_user+''salt'').
----
=== ENCODING ===
Sets preferred [http://en.wikipedia.org/wiki/Character_encoding encoding] per session.
'''Command String:'''
* ENCODING name={str encoding name}
'''Possible Replies:'''
* 219 ENCODING CHANGED
* 519 ENCODING NOT SUPPORTED
'''Info:'''
* Supported encodings: http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html
* Default: ASCII.
* Resets to default on logout.
----
=== SENDMSG: Send Message ===
'''Command String:'''
* SENDMSG to={str username}&title={str title}&body={str body}
'''Possible Replies:'''
* 294 SENDMSG SUCCESSFUL
* 394 NO SUCH USER
* 501 LOGIN FIRST
'''Note:'''
* This command allows you to send an AniDB message.
{{eyecatch|IMPORTANT:|
title must not be longer than 50 chars.
body must not be longer than 900 chars.
}}
----
=== USER: Retrieve user uid ===
'''Command String:'''
* USER user={str user name}
'''Possible Replies:'''
* 394 NO SUCH USER
* 295 USER
: {int4 uid}
'''Info:'''
* The client should the check length (3-10) and case (lower) of ''user'' before sending.


----
----
Line 775: Line 1,006:


----
----
=== STATS ===
 
=== STATS [<span style="color:red">disabled</span>] ===
'''Command String:'''
'''Command String:'''
* STATS
* STATS
Line 784: Line 1,016:


----
----
=== TOP ===
 
=== TOP [<span style="color:red">disabled</span>] ===
'''Command String:'''
'''Command String:'''
* TOP
* TOP
Line 805: Line 1,038:
* All strings are user names.
* All strings are user names.
* 'Hide myself in IRC stats' applies for this too.
* 'Hide myself in IRC stats' applies for this too.
----
=== SENDMSG: Send Message ===
'''Command String:'''
* SENDMSG to={str username}&title={str title}&body={str body}
'''Possible Replies:'''
* 294 SENDMSG SUCCESSFUL
* 394 NO SUCH USER
* 501 LOGIN FIRST
'''Note:'''
* This command allows you to send an AniDB message.
{{eyecatch|IMPORTANT:|
title must not be longer than 50 chars.
body must not be longer than 900 chars.
}}


== Fatal Errors ==
== Fatal Errors ==
Line 839: Line 1,055:
Note: The names below do _not_ necessarily reflect the actual code strings returned by the server.  
Note: The names below do _not_ necessarily reflect the actual code strings returned by the server.  
<pre>
<pre>
/*
// POSITIVE 2XX
* POSITVE 2XX
 
*/
LOGIN_ACCEPTED =200, //a
LOGIN_ACCEPTED =200,
LOGIN_ACCEPTED_NEW_VER =201, //a
LOGIN_ACCEPTED_NEW_VER =201,
LOGGED_OUT =203, //a
LOGGED_OUT =203,
RESOURCE =205, //d
STATS =206,
STATS =206, //b
TOP =207,
TOP =207, //b
UPTIME =208,
UPTIME =208, //b
ENCRYPTION_ENABLED =209, //c
 
MYLIST_ENTRY_ADDED =210, //a
MYLIST_ENTRY_DELETED =211, //a
 
ADDED_FILE =214, //e
ADDED_STREAM =215, //e


MYLIST_ENTRY_ADDED =210,
ENCODING_CHANGED =219, //c
ENTRY_DELETED =211,


FILE =220,
FILE =220, //a
MYLIST =221,
MYLIST =221, //a
MYLIST_STATS =222,
MYLIST_STATS =222, //b


ANIME =230,
ANIME =230, //b
ANIME_BEST_MATCH =231,
ANIME_BEST_MATCH =231, //b
RANDOMANIME =232,
RANDOMANIME =232, //b


EPISODE =240,
EPISODE =240, //b
GROUP =250,
PRODUCER =245, //b
GROUP =250, //b


VOTED =260,
BUDDY_LIST =253, //c
VOTE_FOUND =261,
BUDDY_STATE =254, //c
VOTE_UPDATED =262,
BUDDY_ADDED =255, //c
VOTE_REVOKED =263,
BUDDY_DELETED =256, //c
BUDDY_ACCEPTED =257, //c
BUDDY_DENIED =258, //c


NOTIFICATION_ENABLED =270,
VOTED =260, //b
NOTIFICATION_N =271,
VOTE_FOUND =261, //b
NOTIFICATION_M =272,
VOTE_UPDATED =262, //b
PUSHACK_CONFIRMED =280,
VOTE_REVOKED =263, //b
NOTIFYACK_SUCCESSFUL_M =281,
NOTIFYACK_SUCCESSFUL_N =282,
NOTIFICATION =290,
NOTIFYLIST =291,
NOTIFYGET_MESSAGE =292,
NOTIFYGET_NOTIFY =293,
SENDMSG_SUCCESSFUL =294,


/*
NOTIFICATION_ENABLED =270, //a
* AFFIRMATIVE/NEGATIVE 3XX
NOTIFICATION_NOTIFY =271, //a
*/
NOTIFICATION_MESSAGE =272, //a
PONG =300,
NOTIFICATION_BUDDY =273, //c
FILE_ALREADY_IN_MYLIST =310,
NOTIFICATION_SHUTDOWN =274, //c
MYLIST_ENTRY_EDITED =311,
PUSHACK_CONFIRMED =280, //a
NO_SUCH_FILE =320,
NOTIFYACK_SUCCESSFUL_M =281, //a
NO_SUCH_ENTRY =321,
NOTIFYACK_SUCCESSFUL_N =282, //a
MULTIPLE_FILES_FOUND =322,
NOTIFICATION =290, //a
NOTIFYLIST =291, //a
NOTIFYGET_MESSAGE =292, //a
NOTIFYGET_NOTIFY =293, //a


NO_SUCH_ANIME =330,
SENDMSG_SUCCESSFUL =294, //a
NO_SUCH_EPISODE =340,
USER =295, //d
NO_SUCH_GROUP =350,


NO_SUCH_VOTE =360,
// AFFIRMATIVE/NEGATIVE 3XX
INVALID_VOTE_TYPE =361,
INVALID_VOTE_VALUE =362,
PERMVOTE_NOT_ALLOWED =363,
ALREADY_PERMVOTED =364,


NOTIFICATION_DISABLED =370,
PONG =300, //a
NO_SUCH_PACKET_PENDING =380,
AUTHPONG =301, //c
NO_SUCH_ENTRY_M =381,
NO_SUCH_RESOURCE =305, //d
NO_SUCH_ENTRY_N =382,
API_PASSWORD_NOT_DEFINED =309, //c


NO_SUCH_MESSAGE =392,
FILE_ALREADY_IN_MYLIST =310, //a
NO_SUCH_NOTIFY =393,
MYLIST_ENTRY_EDITED =311, //a
NO_SUCH_USER =394,
MULTIPLE_MYLIST_ENTRIES =312, //e


NO_SUCH_DATA_ENTRY =396,
SIZE_HASH_EXISTS =314, //c
INVALID_DATA =315, //c
STREAMNOID_USED =316, //c


/*
NO_SUCH_FILE =320, //a
* NEGATIVE 4XX
NO_SUCH_ENTRY =321, //a
*/
MULTIPLE_FILES_FOUND =322, //b


NOT_LOGGED_IN =403,
NO_SUCH_ANIME =330, //b
NO_SUCH_MYLIST_FILE =410,
NO_SUCH_EPISODE =340, //b
NO_SUCH_MYLIST_ENTRY =411,
NO_SUCH_PRODUCER =345, //b
NO_SUCH_GROUP =350, //b


BUDDY_ALREADY_ADDED =355, //c
NO_SUCH_BUDDY =356, //c
BUDDY_ALREADY_ACCEPTED =357, //c
BUDDY_ALREADY_DENIED =358, //c


/*
NO_SUCH_VOTE =360, //b
* CLIENT SIDE FAILURE 5XX
INVALID_VOTE_TYPE =361, //b
*/
INVALID_VOTE_VALUE =362, //b
PERMVOTE_NOT_ALLOWED =363, //b
ALREADY_PERMVOTED =364, //b


LOGIN_FAILED =500,
NOTIFICATION_DISABLED =370, //a
LOGIN_FIRST =501,
NO_SUCH_PACKET_PENDING =380, //a
ACCESS_DENIED =502,
NO_SUCH_ENTRY_M =381, //a
CLIENT_VERSION_OUTDATED =503,
NO_SUCH_ENTRY_N =382, //a
CLIENT_BANNED =504,
ILLEGAL_INPUT_OR_ACCESS_DENIED =505,
INVALID_SESSION =506,
BANNED =555,
UNKNOWN_COMMAND =598,


/*
NO_SUCH_MESSAGE =392, //a
* SERVER SIDE FAILURE 6XX
NO_SUCH_NOTIFY =393, //a
*/
NO_SUCH_USER =394, //a


INTERNAL_SERVER_ERROR =600,
 
ANIDB_OUT_OF_SERVICE =601,
// NEGATIVE 4XX
API_VIOLATION =666,
 
 
NOT_LOGGED_IN =403, //a
 
NO_SUCH_MYLIST_FILE =410, //a
NO_SUCH_MYLIST_ENTRY =411, //a
 
 
// CLIENT SIDE FAILURE 5XX
 
 
LOGIN_FAILED =500, //a
LOGIN_FIRST =501, //a
ACCESS_DENIED =502, //a
CLIENT_VERSION_OUTDATED =503, //a
CLIENT_BANNED =504, //a
ILLEGAL_INPUT_OR_ACCESS_DENIED =505, //a
INVALID_SESSION =506, //a
NO_SUCH_ENCRYPTION_TYPE =509, //c
ENCODING_NOT_SUPPORTED =519, //c
 
BANNED =555, //a
UNKNOWN_COMMAND =598, //a
 
 
// SERVER SIDE FAILURE 6XX
 
 
INTERNAL_SERVER_ERROR =600, //a
ANIDB_OUT_OF_SERVICE =601, //a
SERVER_BUSY =602, //d
API_VIOLATION =666, //a
</pre>
</pre>


== Changelog ==
== Changelog ==
<pre>
<pre>
0.03b - 23.07.2006
BUDDY*, PRODUCER, ENCRYPT, ENCODING, USER commands added
AUTH, NOTIFY, ANIME, FILE commands extended
STATS and TOP commands disabled due performance issues
several fixes
0.03 - 13.01.2006
0.03 - 13.01.2006
ANIME, EPISODE, GROUP, STATS, TOP, UPTIME, MYLISTSTATS, VOTE and RANDOM commands added
ANIME, EPISODE, GROUP, STATS, TOP, UPTIME, MYLISTSTATS, VOTE and RANDOM commands added