358
edits
Line 155: | Line 155: | ||
=== 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}] | * 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 168: | Line 168: | ||
* 200 {str session_key} {str ip}:{int2 port} LOGIN ACCEPTED | * 200 {str session_key} {str ip}:{int2 port} LOGIN ACCEPTED | ||
* 201 {str session_key} {str ip}:{int2 port} LOGIN ACCEPTED - NEW VERSION AVAILABLE | * 201 {str session_key} {str ip}:{int2 port} LOGIN ACCEPTED - NEW VERSION AVAILABLE | ||
when imgserver=1 | |||
* 200 {str session_key} LOGIN ACCEPTED | |||
{str image server name} | |||
* 201 {str session_key} LOGIN ACCEPTED - NEW VERSION AVAILABLE | |||
{str image server name} | |||
'''Info:''' | '''Info:''' | ||
Line 180: | Line 185: | ||
* A '''506 INVALID SESSION''' means that either the session key parameter "s" was not provided with a command that requires it or the session key is no longer valid. The client should reissue an AUTH command. | * A '''506 INVALID SESSION''' means that either the session key parameter "s" was not provided with a command that requires it or the session key is no longer valid. The client should reissue an AUTH command. | ||
{{eyecatch|Note|A frontend shall expect 501 and 502 messages to be returned on ANY command.}}<br> | {{eyecatch|Note|A frontend shall expect 501 and 502 messages to be returned on ANY command.}}<br> | ||
{{eyecatch|Note|AniDB usernames | {{eyecatch|Note|AniDB usernames may only contain characters (a-z,A-Z), numbers (0-9), underscores (_) and hyphens (-).}} | ||
* The client should send the apiversion of the AnimeDB API version it supports as value of the protover parameter. | * The client should send the apiversion of the AnimeDB API version it supports as value of the protover parameter. | ||
* The client MAY NOT send anything but the version of the API Specs the author used to write the client! (as it is stated at the top of this file @ "Version number used for protover parameter") | * The client MAY NOT send anything but the version of the API Specs the author used to write the client! (as it is stated at the top of this file @ "Version number used for protover parameter") | ||
Line 189: | Line 193: | ||
: clientname and clientversion might be used by the API to distinguish between different clients and client versions if that should ever become necessary. | : clientname and clientversion might be used by the API to distinguish between different clients and client versions if that should ever become necessary. | ||
{{eyecatch|Important| | {{eyecatch|Important| | ||
* DO NOT use the clientname of | * DO NOT use the clientname of an existing client. If you modify an existing client's code to meet your own needs, create a new client name for yourself. | ||
* ALWAYS increase the clientversion number if you release a new client version.}} | * ALWAYS increase the clientversion number if you release a new client version.}} | ||
* A Login and its assigned ''session_key'' is valid until the virtual UDP connection times out or until a LOGOUT command is issued. | * A Login and its assigned ''session_key'' is valid until the virtual UDP connection times out or until a LOGOUT command is issued. | ||
Line 214: | Line 218: | ||
---- | ---- | ||
=== LOGOUT: Logout === | === LOGOUT: Logout === | ||
'''Command String:''' | '''Command String:''' |