UDP API Definition: Difference between revisions

m
In AUTH "Command String:" mtu parameter was missing a '=' sign.
m (In AUTH "Command String:" mtu parameter was missing a '=' sign.)
(34 intermediate revisions by 6 users not shown)
Line 3: Line 3:
== General Information ==
== General Information ==
'''Author:''' [[User:Exp|Exp]] & [[User:Epoximator|Epoximator]] & [[User:Ommina|Ommina]]<br>
'''Author:''' [[User:Exp|Exp]] & [[User:Epoximator|Epoximator]] & [[User:Ommina|Ommina]]<br>
'''Version:''' 0.03.455 (2010-02-18)<br>
'''Version:''' 0.03.730 (2015-03-25)<br>
'''Version number used for protover parameter:''' "3"
'''Version number used for protover parameter:''' "3"


Line 31: Line 31:
** All newlines should be replaced by &lt;br /&gt;
** All newlines should be replaced by &lt;br /&gt;
* Escape scheme for returned data fields (from server): ', | and newline
* Escape scheme for returned data fields (from server): ', | and newline
** Content newlines are encoded as &lt;br /&gt;, ' is encoded as ` and | is not allowed in data fields.
** Content newlines are encoded as &lt;br /&gt;, ' is encoded as ` and | is encoded as /.
** Dates are returned in unix time (number of seconds elapsed since January 1, 1970 00:00:00 UTC)
** Dates are returned in unix time (number of seconds elapsed since January 1, 1970 00:00:00 UTC)


== Basics ==
== Basics ==
=== General ===
=== General ===
The network communication is ''packet'' and ''line'' based. Each AniDB API command is exactly one UDP packet containing one line. Results are sent as one packet but may consist out of multiple lines. A return value always starts with a 3 byte result code followed by a human readable version of the result code. Be aware that important data fields may be returned directly after the return code (see: 200,201,271,272,504).
The network communication is ''packet'' and ''line'' based. Each AniDB API command is exactly one UDP packet containing one line. Results are sent as one packet but may consist out of multiple lines. A return value always starts with a 3 byte result code followed by a human readable version of the result code. Be aware that important data fields may be returned directly after the return code (see: 200,201,209,271,272,504).
The meaning for all result codes can be found in this document. If there is more than one entry returned, it's one entry per line. Lines are terminated by a <tt>\n</tt> (no dos linefeed <tt>\r</tt>). The elements of a format string are separated by a "|" character.
The meaning for all result codes can be found in this document. If there is more than one entry returned, it's one entry per line. Lines are terminated by a <tt>\n</tt> (no dos linefeed <tt>\r</tt>). The elements of a format string are separated by a "|" character.


Line 55: Line 55:
*** 601 ANIDB OUT OF SERVICE - TRY AGAIN LATER
*** 601 ANIDB OUT OF SERVICE - TRY AGAIN LATER
*** 602 SERVER BUSY - TRY AGAIN LATER
*** 602 SERVER BUSY - TRY AGAIN LATER
*** 604 TIMEOUT - DELAY AND RESUBMIT
** Additional return codes for all commands that '''require login''':
** Additional return codes for all commands that '''require login''':
*** 501 LOGIN FIRST
*** 501 LOGIN FIRST
Line 156: Line 157:
=== 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&comp=1&enc={str encoding}&mtu{int4 mtu value}&imgserver=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}&imgserver=1]


'''Possible Replies:'''
'''Possible Replies:'''
Line 234: Line 235:
----
----
=== ENCRYPT: Start Encrypted Session ===
=== ENCRYPT: Start Encrypted Session ===
Will cause all future messages from the server, except the first (the reply to the ENCRYPT command itself), to be encrypted (128 bit [[Wikipedia: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 [[Wikipedia: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.
Will cause all future messages from the server, except the first (the reply to the ENCRYPT command itself), to be encrypted (128 bit [[Wikipedia: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 [[Wikipedia:MD5|MD5]] hash of a special ''UDP API Key'' (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:'''
'''Command String:'''
Line 248: Line 249:
* ''user'' is the user name.
* ''user'' is the user name.
* ''type'' is the type of encryption; 1 => 128 bit AES (only one defined).
* ''type'' is the type of encryption; 1 => 128 bit AES (only one defined).
* ''API Password'' is the one defined in the {{AniDBLink|profile|profile settings page}}.
* ''API Key'' is the one defined in the {{AniDBLink|profile|profile settings page}}.
* It is not possible to disable the encryption once enabled while staying logged in.
* 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.
** 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.
* 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'').
* The encryption key is md5(api_key_of_user+''salt'').
* Padding of the message needs to be done according to the PKCS5Padding scheme.
* Padding of the message needs to be done according to the PKCS5Padding scheme.


Line 473: Line 474:
'''Info:'''
'''Info:'''
* See: '''PUSH'''
* See: '''PUSH'''
== Notification Commands ==
=== NOTIFICATIONADD: Add Anime or Group to Notify List ===
'''Command String:'''<br>
by anime id:
* NOTIFICATIONADD aid={int4 aid}&type={int2 type}&priority={int2 priority}
by group id:
* NOTIFICATIONADD gid={int4 gid}&type={int2 type}&priority={int2 priority}
<br>
'''Possible Replies:'''
* 246 NOTIFICATION ITEM ADDED
: {int4 notification id}
* 248 NOTIFICATION ITEM UPDATED
: {int4 notification id}
* 399 NO CHANGES
<br>
'''Info:'''
* ''Priority'' values are 0: low, 1: medium, 2: high
* ''Type'' values are 0: all, 1: new, 2: group, 3: complete
=== NOTIFICATIONDEL: Remove Anime or Group from Notify List ===
'''Command String:'''<br>
by anime id:
* NOTIFICATIONDEL aid={int4 aid}
by group id:
* NOTIFICATIONDEL gid={int4 gid}
<br>
'''Possible Replies:'''
* 247 NOTIFICATION ITEM DELETED
: {int4 notification_table}|{int4 relid}
* 324 NO SUCH NOTIFICATION ITEM
<br>
'''Info:'''
* ''notification_table'' values are 1: anime, 2: group
* ''relid'' value matches the aid/gid supplied


== Buddy Commands ==
== Buddy Commands ==
Line 559: Line 603:
* Fields are returned in the same order they appear in the ''amask'' field list: byte 1, bit 7 first
* Fields are returned in the same order they appear in the ''amask'' field list: byte 1, bit 7 first
* Synonyms and short names are separated with '
* Synonyms and short names are separated with '
* Category fields are separated with ',' and ordered by weight (desc).
* Category fields are separated with ',' and ordered by weight (desc). ''However'', be aware that categories are no longer used nor updated internally, and category responses are only returned to avoid breaking older clients.  Use tags as a replacement. 
* 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.
* 'Producer id list' and 'producer name list' match the data returned by the former producer bits (but using the revised creator ids)
* 'Producer id list' and 'producer name list' match the data returned by the former producer bits (but using the revised creator ids)
* Date flags are used to indicated an unknown value (unknown month, day, year)
* ''dateflags'' values:
** bit0 set == Startdate, Unknown Day
** bit1 set == Startdate, Unknown Month, Day
** bit2 set == Enddate, Unknown Day
** bit3 set == Enddate, Unknown Month, Day
** bit4 set == AirDate in the Past/Anime has ended
** bit5 set == Startdate, Unknown Year
** bit6 set == Enddate, Unknown Year


* '''Note:''' The character id list is the first data to be truncated if needed. And then: category list, synonym list, short name list. This applies to the FILE command too.
* '''Note:''' The character id list is the first data to be truncated if needed. And then: tag list, synonym list, short name list. This applies to the FILE command too.
* Selecting an 'unused' or 'reserved' bit will return an "illegal input" (505) response.
* Selecting an 'unused' or 'reserved' bit will return an "illegal input" (505) response.


Line 593: Line 646:
     <td>6</td>
     <td>6</td>
     <td align="right">64</td>
     <td align="right">64</td>
     <td>unused</td>
     <td>int dateflags</td>
     </tr>
     </tr>
     <tr bgcolor="#eeeeee">
     <tr bgcolor="#eeeeee">
Line 618: Line 671:
     <td>1</td>
     <td>1</td>
     <td align="right">2</td>
     <td align="right">2</td>
     <td>str category list</td>
     <td><i>retired</i></td>
     </tr>
     </tr>
     <tr>
     <tr>
     <td>0</td>
     <td>0</td>
     <td align="right">1</td>
     <td align="right">1</td>
     <td>str category weight list</td>
     <td><i>retired</i></td>
     </tr>
     </tr>
   </table>
   </table>
Line 721: Line 774:
     <td>0</td>
     <td>0</td>
     <td align="right">1</td>
     <td align="right">1</td>
     <td>str category id list</td>
     <td><i>retired</i></td>
     </tr>
     </tr>
   </table>
   </table>
Line 784: Line 837:
     <td>7</td>
     <td>7</td>
     <td align="right">128</td>
     <td align="right">128</td>
     <td>int anime planet id</td>
     <td><i>retired</i></td>
     </tr>
     </tr>
     <tr>
     <tr>
Line 804: Line 857:
     <td>3</td>
     <td>3</td>
     <td align="right">8</td>
     <td align="right">8</td>
     <td>unused</td>
     <td>str tag name list</td>
     </tr>
     </tr>
     <tr>
     <tr>
     <td>2</td>
     <td>2</td>
     <td align="right">4</td>
     <td align="right">4</td>
     <td>unused</td>
     <td>int tag id list</td>
     </tr>
     </tr>
     <tr bgcolor="#eeeeee">
     <tr bgcolor="#eeeeee">
     <td>1</td>
     <td>1</td>
     <td align="right">2</td>
     <td align="right">2</td>
     <td>unused</td>
     <td>int tag weight list</td>
     </tr>
     </tr>
     <tr>
     <tr>
Line 838: Line 891:
     <td>6</td>
     <td>6</td>
     <td align="right">64</td>
     <td align="right">64</td>
     <td>int creator id list</td>
     <td><i>retired</i></td>
     </tr>
     </tr>
     <tr bgcolor="#eeeeee">
     <tr bgcolor="#eeeeee">
     <td>5</td>
     <td>5</td>
     <td align="right">32</td>
     <td align="right">32</td>
     <td>int main creator id list</td>
     <td><i>retired</i></td>
     </tr>
     </tr>
     <tr>
     <tr>
     <td>4</td>
     <td>4</td>
     <td align="right">16</td>
     <td align="right">16</td>
     <td>str main creator name list</td>
     <td><i>retired</i></td>
     </tr>
     </tr>
     <tr bgcolor="#eeeeee">
     <tr bgcolor="#eeeeee">
Line 932: Line 985:
     2      prequel
     2      prequel
   11      same setting
   11      same setting
   21     alternative setting
   12     alternative setting
   32      alternative version
   32      alternative version
   41      music video
   41      music video
Line 1,003: Line 1,056:
** bit6 set == Enddate, Unknown Year
** bit6 set == Enddate, Unknown Year


----
=== CHARACTER: Get Character Information ===
=== CHARACTER: Get Character Information ===
Returns character details associated with a given character ID, including associated anime ids, episode ids, and seiyuu.
Returns character details associated with a given character ID, including associated anime ids, episode ids, and seiyuu.
Line 1,070: Line 1,125:
'''Possible Replies:'''
'''Possible Replies:'''
* 240 EPISODE
* 240 EPISODE
: {int eid}|{int aid}|{int4 length}|{int4 rating}|{int votes}|{str epno}|{str eng}|{str romaji}|{str kanji}|{int aired}
: {int eid}|{int aid}|{int4 length}|{int4 rating}|{int votes}|{str epno}|{str eng}|{str romaji}|{str kanji}|{int aired}|{int type}
* 340 NO SUCH EPISODE
* 340 NO SUCH EPISODE


'''Info:'''
'''Info:'''
* length is in minutes
* length is in minutes
* Returned 'epno' includes special character (only if special) and padding (only if normal). Special characters are S(special), C(credits), T(trailer), P(parody), O(other).
* Returned 'epno' includes special character (only if special) and padding (only if normal).
** Special characters are S(special), C(credits), T(trailer), P(parody), O(other).
* The ''type'' is the raw episode type, used to indicate numerically what the special character will be
** 1: regular episode (no prefix), 2: special ("S"), 3: credit ("C"), 4: trailer ("T"), 5: parody ("P"), 6: other ("O")


'''Examples:''' (html escaped code intended)
'''Examples:''' (html escaped code intended)
Line 1,084: Line 1,142:
   > EPISODE aname=Seikai no Monshou&epno=2&s=xxxxx
   > EPISODE aname=Seikai no Monshou&epno=2&s=xxxxx
   < 240 EPISODE
   < 240 EPISODE
   2|1|24|750|2|02|Kin of the Stars|Hoshi-tachi no Kenzoku|??????|1295059229
   2|1|24|750|2|02|Kin of the Stars|Hoshi-tachi no Kenzoku|??????|1295059229|1


----
----
Line 1,118: Line 1,176:
* Only the first matching file is returned when aname, gname and epno is used.
* Only the first matching file is returned when aname, gname and epno is used.
* "audio codec" and "audio bitrate" will return multiple values if there are multiple audio streams present in the file.  Values will be separated by a single quote.   
* "audio codec" and "audio bitrate" will return multiple values if there are multiple audio streams present in the file.  Values will be separated by a single quote.   
* For byte 1, bit 2 (other episodes): episode IDs will be followed by an integer '''percentage''' that indicate the percentage of the related episode this file covers. Typically 100%, there are cases where it will be 50, 30, or other values.
* For byte 1, bit 2 (other episodes): episode IDs will be followed by an integer '''percentage''' that indicate the percentage of the related episode this file covers. Typically 100%, there are cases where it will be 50, 30, or other values.  This value provides no indication where, within an episode, the file represents.  That is, 50% could mean the file covers the first half of the episode, the second half, or some 50% range in between.
'''State:'''
'''State:'''
<pre>
<pre>
Line 1,238: Line 1,296:
     <td>1</td>
     <td>1</td>
     <td align="right">2</td>
     <td align="right">2</td>
     <td>unused</td>
     <td>video colour depth</td>
     </tr>
     </tr>
     <tr bgcolor="#eeeeee">
     <tr bgcolor="#eeeeee">
Line 1,621: Line 1,679:
'''Possible Replies:'''
'''Possible Replies:'''
* 250 GROUP
* 250 GROUP
: {int gid}|{int4 rating}|{int votes}|{int4 acount}|{int fcount}|{str name}|{str short}|{str irc channel}|{str irc server}|{str url}|{str picname}
: {int gid}|{int4 rating}|{int votes}|{int4 acount}|{int fcount}|{str name}|{str short}|{str irc channel}|{str irc server}|{str url}|{str picname}|{int4 foundeddate}|{int4 disbandeddate}|{int2 dateflags}|{int4 lastreleasedate}|{int4 lastactivitydate}|{list grouprelations}
* 350 NO SUCH GROUP
* 350 NO SUCH GROUP


'''Info:'''
'''Info:'''
* Requires login
* Requires login
* <i>gname</i> is an exact match of either a group name or short name
* ''gname'' is an exact match of either a group name or short name
* As either names and short names are unique if there is a result from GROUP request by name that will be the only match
* As either name and short names are unique if there is a result from GROUP request by name that will be the only match
* ''dateflags'' values:
** bit0 set == Foundeddate, Unknown Day
** bit1 set == Foundeddate, Unknown Month, Day
** bit2 set == Disbandeddate, Unknown Day
** bit3 set == Disbandeddate, Unknown Month, Day
** bit5 set == Foundeddate, Unknown Year
** bit6 set == Disbandeddate, Unknown Year
* ''releasedate'' and ''activitydate'' are distinct.  ''releasedate'' is the date a file was actually released by the group, where ''activitydate'' is the date of a file being added to AniDB.  As such, lastrelease may very well be much older than lastactivity.
* ''groupreleations'' is a list of apostrophe-separated pairs, where each pair consists of {int4 othergroupid},{int2 relationtype}
** relationtype:
*** 1 => "Participant in"
*** 2 => "Parent of"
*** 4 => "Merged from"
*** 5 => "Now known as"
*** 6 => "Other"


'''Examples:'''
'''Example:'''
   > GROUP gid=1&s=xxxxx
   > GROUP gid=7091&s=bunny
   < 250 GROUP
   < 250 GROUP
   41|851|665|109|1004|Zhentarim DivX|zx|#zhentarim|irc.deltaanime.net|<nowiki>http://www.zhentarim.net/</nowiki>|1134.gif
   7091|832|1445|43|566|Frostii|Frostii|#frostii|irc.rizon.net|<nowiki>http://frostii.com</nowiki>|15844.jpg|1228089600|0|1|1301875200|1304222640|7255,1'3097,4'748,4'8106,1'8159,2'8402,1'8696,1'9022,1
 
  > GROUP gname=a-l&s=xxxxx
  < 250 GROUP
  566|840|453|53|534|Anime-Legion|A-L|#anime-legion|irc.irchighway.net|<nowiki>http://www.anime-legion.net</nowiki>|1088.png


----
----
Line 1,652: Line 1,721:
: ... (repeated)
: ... (repeated)


* 325 NO GROUPS FOUND
* 325 NO SUCH GROUPS FOUND
* 330 NO SUCH ANIME
* 330 NO SUCH ANIME


Line 1,668: Line 1,737:
#finished
#finished
#specials only
#specials only
'''Example:'''
  > GROUP GROUPSTATUS aid=8692&s=vLl1N
  < 225 GROUPSTATUS
  7407|Coalgirls|3|25|839|12|1-25
  9863|Hadena Subs|3|25|374|1|1-25
  11951|ChaosBlades|3|25|0|0|1-25
  [truncated]
=== UPDATED: Get List of Updated Anime IDs ===
Returns a list of AniDB anime ids of anime that have been updated in in a given time frame, ordered by descending age (oldest to newest change).
'''Command String:'''
* UPDATED entity=1&[age={int4 id}|time={int4 date}]
'''Possible Replies:'''
* 243 UPDATED
{int entity}|{int total count}|{int last update date}|{list aid}
* 343 NO UPDATES
'''Info:'''
* ''entity'' is always 1
* Either ''age'' OR ''time'' can be specified, but not both
* ''age'' is specified in days.
** eg: age=30 requests a list of aid values of anime that have changed in the past 30 days
* ''time'' is specified in unix time.
** eg: time=1264982400 requests a list of aid values of anime that have changed since 2010-02-01
* A maximum of 200 values will be returned
* ''count'' specifies the total number of items found for the given time period.  In short, if this value is great than 200, you have not retrieved all applicable ids.
* ''last update date'' will contain the AniDB update time of the ''last'' aid to appear on the list
* A given list value will appear only once.  If there have been multiple changes to an entity, its age will reflect the most recent change.
'''An anime will be considered updated if:'''
* A change is made to the anime record itself
* An ''main'' or ''official'' anime title is added, edited, or deleted (not ''short'' or ''synonym'')
* An episode for the anime is added, or deleted (but NOT edited!)
* An episode title is added, edited, or deleted
* An anime relation is added, or deleted


== MyList Commands ==
== MyList Commands ==
Line 1,698: Line 1,806:
'''States:'''
'''States:'''
   0 - unknown - state is unknown or the user doesn't want to provide this information
   0 - unknown - state is unknown or the user doesn't want to provide this information
   1 - on hdd - the file is stored on hdd (but is not shared)
   1 - internal storage - the file is stored on hdd (but is not shared)
   2 - on cd - the file is stored on cd
   2 - external storage - the file is stored on cd/dvd/...
   3 - deleted - the file has been deleted or is not available for other reasons (i.e. reencoded)
   3 - deleted - the file has been deleted or is not available for other reasons (i.e. reencoded)
  4 - remote storage - the file is stored on NAS/cloud/...


'''Filestates:''' (for normal files, i.e. not generic)
'''Filestates:''' (for normal files, i.e. not generic)
Line 1,720: Line 1,829:


----
----
=== MYLISTADD: Add file to MyList ===
=== MYLISTADD: Add file to MyList ===
The command string for MYLISTADD is made of up two blocks: a 'fileinfo' block, which limits the command to a specific file, or an 'animeinfo'/'groupinfo'/'episodeinfo' block, which can be used to specify a range of files, including generics.  Additionally, a number of optional parameters can be included with either set.
The command string for MYLISTADD is made of up two blocks: a 'fileinfo' block, which limits the command to a specific file, or an 'animeinfo'/'groupinfo'/'episodeinfo' block, which can be used to specify a range of files, including generics.  Additionally, a number of optional parameters can be included with either set.
Line 1,769: Line 1,879:
: {int4 number of entries added}
: {int4 number of entries added}
* 310 FILE ALREADY IN MYLIST
* 310 FILE ALREADY IN MYLIST
: {int4 lid}|{int4 fid}|{int4 eid}|{int4 aid}|{int4 gid}|{int4 date}|{int2 state}|{int4 viewdate}|{str storage}|{str source}|{str other}|{int2 filestate}
* 322 MULTIPLE FILES FOUND
* 322 MULTIPLE FILES FOUND
: {int4 fid 1}|{int4 fid 2}|...|{int4 fid n}
: {int4 fid 1}|{int4 fid 2}|...|{int4 fid n}
Line 1,780: Line 1,891:
* All data except lid/fid/size+hash/generic is optional.
* All data except lid/fid/size+hash/generic is optional.
* Viewed should be 0 for unwatched files and 1 for watched files.
* Viewed should be 0 for unwatched files and 1 for watched files.
* if viewdate is not specified, the current time will be used. The field will be disregarded if viewed=0.
* If viewdate is not specified, the current time will be used. The field will be disregarded if viewed=0.
* Other is the only field which may contain newlines, but they have to be stored as &lt;br /&gt;
* Other is the only field which may contain newlines, but they have to be stored as &lt;br /&gt;
* For state values refer to: '''MYLIST'''
* For state values refer to: '''MYLIST'''
Line 1,786: Line 1,897:
* epno=0 means all eps (default), negative numbers means upto. (-12 -> upto 12)
* epno=0 means all eps (default), negative numbers means upto. (-12 -> upto 12)
* group is optional only when edit=1, meaning you can't add every file for an anime
* group is optional only when edit=1, meaning you can't add every file for an anime
* If the file already exists (response code 310), the ''current'' record will be returned, in the same format as the MYLIST response.
----


----
=== MYLISTDEL: Remove file from MyList ===
=== MYLISTDEL: Remove file from MyList ===
'''Command String:'''<br>
'''Command String:'''<br>
Line 1,878: Line 1,990:


'''Possible Replies:'''
'''Possible Replies:'''
* 217 Export Queued
* 217 EXPORT QUEUED
* 218 Export Cancelled
* 218 EXPORT CANCELLED
* 317 No Such Template
* 317 EXPORT NO SUCH TEMPLATE
* 318 Export Already In Queue
* 318 EXPORT ALREADY IN QUEUE
* 319 No Export In Queue or Export In Progress
* 319 EXPORT NO EXPORT QUEUED OR IS PROCESSING


'''Info:'''
'''Info:'''
Line 2,022: Line 2,134:


== Return Codes ==
== Return Codes ==
{{eyecatch|Note|The names below do '''not''' necessarily reflect the actual code strings returned by the server.}}
{{eyecatch|Note|While the names below '''are''' the actual code strings returned by the server, clients are nonetheless encouraged to work with the numeric codes instead. }}
<pre>
<pre>
// POSITIVE 2XX
LOGIN_ACCEPTED                          = 200
LOGIN_ACCEPTED_NEW_VERSION              = 201
LOGGED_OUT                              = 203
RESOURCE                                = 205
STATS                                    = 206
TOP                                      = 207
UPTIME                                  = 208
ENCRYPTION_ENABLED                      = 209
MYLIST_ENTRY_ADDED                      = 210
MYLIST_ENTRY_DELETED                    = 211
ADDED_FILE                              = 214
ADDED_STREAM                            = 215
EXPORT_QUEUED                            = 217
EXPORT_CANCELLED                        = 218
ENCODING_CHANGED                        = 219
FILE                                    = 220
MYLIST                                  = 221
MYLIST_STATS                            = 222
WISHLIST                                = 223
NOTIFICATION                            = 224
GROUP_STATUS                            = 225
WISHLIST_ENTRY_ADDED                    = 226
WISHLIST_ENTRY_DELETED                  = 227
WISHLIST_ENTRY_UPDATED                  = 228
MULTIPLE_WISHLIST                        = 229
ANIME                                    = 230
ANIME_BEST_MATCH                        = 231
RANDOM_ANIME                            = 232
ANIME_DESCRIPTION                        = 233
REVIEW                                  = 234
CHARACTER                                = 235
SONG                                    = 236
ANIMETAG                                = 237
CHARACTERTAG                            = 238
EPISODE                                  = 240
UPDATED                                  = 243
TITLE                                    = 244
CREATOR                                  = 245
NOTIFICATION_ENTRY_ADDED                = 246
NOTIFICATION_ENTRY_DELETED              = 247
NOTIFICATION_ENTRY_UPDATE                = 248
MULTIPLE_NOTIFICATION                    = 249
GROUP                                    = 250
CATEGORY                                = 251
BUDDY_LIST                              = 253
BUDDY_STATE                              = 254
BUDDY_ADDED                              = 255
BUDDY_DELETED                            = 256
BUDDY_ACCEPTED                          = 257
BUDDY_DENIED                            = 258
VOTED                                    = 260
VOTE_FOUND                              = 261
VOTE_UPDATED                            = 262
VOTE_REVOKED                            = 263
HOT_ANIME                                = 265
RANDOM_RECOMMENDATION                    = 266
RANDOM_SIMILAR                          = 267
NOTIFICATION_ENABLED                    = 270
NOTIFYACK_SUCCESSFUL_MESSAGE            = 281
NOTIFYACK_SUCCESSFUL_NOTIFIATION        = 282
NOTIFICATION_STATE                      = 290
NOTIFYLIST                              = 291
NOTIFYGET_MESSAGE                        = 292
NOTIFYGET_NOTIFY                        = 293
SENDMESSAGE_SUCCESSFUL                  = 294
USER_ID                                  = 295
CALENDAR                                = 297


LOGIN_ACCEPTED =200, //a
PONG                                    = 300
LOGIN_ACCEPTED_NEW_VER =201, //a
AUTHPONG                                = 301
LOGGED_OUT =203, //a
NO_SUCH_RESOURCE                        = 305
RESOURCE =205, //d
API_PASSWORD_NOT_DEFINED                = 309
STATS =206, //b
FILE_ALREADY_IN_MYLIST                  = 310
TOP =207, //b
MYLIST_ENTRY_EDITED                      = 311
UPTIME =208, //b
MULTIPLE_MYLIST_ENTRIES                  = 312
ENCRYPTION_ENABLED =209, //c
WATCHED                                  = 313
SIZE_HASH_EXISTS                        = 314
INVALID_DATA                            = 315
STREAMNOID_USED                          = 316
EXPORT_NO_SUCH_TEMPLATE                  = 317
EXPORT_ALREADY_IN_QUEUE                  = 318
EXPORT_NO_EXPORT_QUEUED_OR_IS_PROCESSING = 319
NO_SUCH_FILE                            = 320
NO_SUCH_ENTRY                            = 321
MULTIPLE_FILES_FOUND                    = 322
NO_SUCH_WISHLIST                        = 323
NO_SUCH_NOTIFICATION                    = 324
NO_GROUPS_FOUND                          = 325
NO_SUCH_ANIME                            = 330
NO_SUCH_DESCRIPTION                      = 333
NO_SUCH_REVIEW                          = 334
NO_SUCH_CHARACTER                        = 335
NO_SUCH_SONG                            = 336
NO_SUCH_ANIMETAG                        = 337
NO_SUCH_CHARACTERTAG                    = 338
NO_SUCH_EPISODE                          = 340
NO_SUCH_UPDATES                          = 343
NO_SUCH_TITLES                          = 344
NO_SUCH_CREATOR                          = 345
NO_SUCH_GROUP                            = 350
NO_SUCH_CATEGORY                        = 351
BUDDY_ALREADY_ADDED                      = 355
NO_SUCH_BUDDY                            = 356
BUDDY_ALREADY_ACCEPTED                  = 357
BUDDY_ALREADY_DENIED                    = 358
NO_SUCH_VOTE                            = 360
INVALID_VOTE_TYPE                        = 361
INVALID_VOTE_VALUE                      = 362
PERMVOTE_NOT_ALLOWED                    = 363
ALREADY_PERMVOTED                        = 364
HOT_ANIME_EMPTY                          = 365
RANDOM_RECOMMENDATION_EMPTY              = 366
RANDOM_SIMILAR_EMPTY                    = 367
NOTIFICATION_DISABLED                    = 370
NO_SUCH_ENTRY_MESSAGE                    = 381
NO_SUCH_ENTRY_NOTIFICATION              = 382
NO_SUCH_MESSAGE                          = 392
NO_SUCH_NOTIFY                          = 393
NO_SUCH_USER                            = 394
CALENDAR_EMPTY                          = 397
NO_CHANGES                              = 399


MYLIST_ENTRY_ADDED =210, //a
NOT_LOGGED_IN                            = 403
MYLIST_ENTRY_DELETED =211, //a
NO_SUCH_MYLIST_FILE                      = 410
NO_SUCH_MYLIST_ENTRY                    = 411
MYLIST_UNAVAILABLE                      = 412


ADDED_FILE =214, //e
LOGIN_FAILED                            = 500
ADDED_STREAM =215, //e
LOGIN_FIRST                              = 501
ACCESS_DENIED                            = 502
CLIENT_VERSION_OUTDATED                  = 503
CLIENT_BANNED                            = 504
ILLEGAL_INPUT_OR_ACCESS_DENIED          = 505
INVALID_SESSION                          = 506
NO_SUCH_ENCRYPTION_TYPE                  = 509
ENCODING_NOT_SUPPORTED                  = 519
BANNED                                  = 555
UNKNOWN_COMMAND                          = 598


ENCODING_CHANGED =219, //c
INTERNAL_SERVER_ERROR                    = 600
ANIDB_OUT_OF_SERVICE                    = 601
SERVER_BUSY                              = 602
NO_DATA                                  = 603
TIMEOUT - DELAY AND RESUBMIT            = 604
API_VIOLATION                            = 666


FILE =220, //a
PUSHACK_CONFIRMED                        = 701
MYLIST =221, //a
NO_SUCH_PACKET_PENDING                  = 702
MYLIST_STATS =222, //b


ANIME =230, //b
VERSION                                  = 998</pre>
ANIME_BEST_MATCH =231, //b
RANDOMANIME =232, //b
        ANIME_DESCRIPTION                      =233, //b
 
EPISODE =240, //b
PRODUCER =245, //b
GROUP =250, //b
 
BUDDY_LIST =253, //c
BUDDY_STATE =254, //c
BUDDY_ADDED =255, //c
BUDDY_DELETED =256, //c
BUDDY_ACCEPTED =257, //c
BUDDY_DENIED =258, //c
 
VOTED =260, //b
VOTE_FOUND =261, //b
VOTE_UPDATED =262, //b
VOTE_REVOKED =263, //b
 
NOTIFICATION_ENABLED =270, //a
NOTIFICATION_NOTIFY =271, //a
NOTIFICATION_MESSAGE =272, //a
NOTIFICATION_BUDDY =273, //c
NOTIFICATION_SHUTDOWN =274, //c
PUSHACK_CONFIRMED =280, //a
NOTIFYACK_SUCCESSFUL_M =281, //a
NOTIFYACK_SUCCESSFUL_N =282, //a
NOTIFICATION =290, //a
NOTIFYLIST =291, //a
NOTIFYGET_MESSAGE =292, //a
NOTIFYGET_NOTIFY =293, //a
 
SENDMSG_SUCCESSFUL =294, //a
USER =295, //d
 
// AFFIRMATIVE/NEGATIVE 3XX
 
PONG =300, //a
AUTHPONG =301, //c
NO_SUCH_RESOURCE =305, //d
API_PASSWORD_NOT_DEFINED =309, //c
 
FILE_ALREADY_IN_MYLIST =310, //a
MYLIST_ENTRY_EDITED =311, //a
MULTIPLE_MYLIST_ENTRIES =312, //e
 
SIZE_HASH_EXISTS =314, //c
INVALID_DATA =315, //c
STREAMNOID_USED =316, //c
 
NO_SUCH_FILE =320, //a
NO_SUCH_ENTRY =321, //a
MULTIPLE_FILES_FOUND =322, //b
 
NO_SUCH_ANIME =330, //b
        NO_SUCH_ANIME_DESCRIPTION              =333, //b
NO_SUCH_EPISODE =340, //b
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
INVALID_VOTE_TYPE =361, //b
INVALID_VOTE_VALUE =362, //b
PERMVOTE_NOT_ALLOWED =363, //b
ALREADY_PERMVOTED =364, //b
 
NOTIFICATION_DISABLED =370, //a
NO_SUCH_PACKET_PENDING =380, //a
NO_SUCH_ENTRY_M =381, //a
NO_SUCH_ENTRY_N =382, //a
 
NO_SUCH_MESSAGE =392, //a
NO_SUCH_NOTIFY =393, //a
NO_SUCH_USER =394, //a
 
 
// NEGATIVE 4XX
 
 
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>


[[Category:Development]]
[[Category:Development]]
[[Category:UDP]]
[[Category:UDP]]
[[Category:API]]
[[Category:API]]
2

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.