UDP API DEV
UDP API DEVELOPMENT
- add feature requests here
- feel free to edit / comment / whatever
Data Commands
ANIME
Possible Replies:
- XXX ANIME BEST MATCH
- ...
Comments:
I'd like this command to cope with a couple of different encodings when passed a title, and be explicit over whether it finds only one result or does a best-match guess. --Rar 04:51, 30 Oct 2005 (CET)
- On second thought, is a wide search really wanted or is 'WHERE lower(name)=' good enough?. About encodings, do you care to elaborate? --Epoximator 18:24, 25 November 2005 (CET)
EPISODE
GROUP
FILE
Comments:
Pass a list of fields (limit e.g. 10 entries)
and return content. This makes it possible to request new fields in the database without
breaking API for older clients.
On updates, only the list of possible fields
need to be extendet. -- --Dinoex
- I think it's a good idea. Modified a bit. --Epoximator 13:38, 26 November 2005 (CET)
Buddy Commands
Group of commands used to administrate your buddylist.
ADDBUDDY
Command String:
- ADDBUDDY uid={int4 buddy uid}
- ADDBUDDY uname={int4 buddy name}
Possible Replies:
- XXX BUDDY ADDED
- XXX NO SUCH USER
- XXX USER IS ALREADY A BUDDY
DELBUDDY
Command String:
- DELBUDDY uid={int4 buddy uid}
Possible Replies:
- XXX BUDDY DELETED
- XXX NO SUCH BUDDY
- XXX YOU GOT NO FRIENDS
ACCEPTBUDDY
Command String:
- ACCEPTBUDDY uid=NNN
Possible Replies:
- XXX BUDDY ACCEPTED
- XXX NO SUCH BUDDY
- XXX BUDDY ALREADY ACCEPTED
DENYBUDDY
Command String:
- DENYBUDDY uid={int4 buddy uid}
Possible Replies:
- XXX BUDDY DENIED
- XXX NO SUCH USER
- XXX BUDDY ALREADY DENIED
BUDDYLIST
Command String:
- BUDDYLIST startat={int2 start at #}
Possible Replies:
- NNN {int2 start} {int2 end} {int2 total} BUDDY LIST
- {int4 uid}|{str username}|{int2 accepted}
- ...
BUDDYSTATE
Command String:
- BUDDYSTATE startat={int2 start at #}
Possible Replies:
- XXX {int2 start} {int2 end} {int2 total} BUDDY STATE
- {int4 uid}|{int2 onlinestate}
- ...
Info:
- onlinestate: 0=offline, 1=http online, 2=udp api online, 3=http&udp api online
Misc Commands
ENCRYPT
Will cause all future messages from the server, except the first (the reply to the ENCRYPT command itself), to be encrypted (128 bit 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 MD5 hash of a special (new/to be added) password defined in the users profile. 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:
- XXX ENCRYPTION ENABLED
- XXX NO SUCH USER
- XXX ENCRYPTION PASSWORD NOT DEFINED
- XXX NO SUCH TYPE
Info:
- user is username
- type is type of encryption, 1 => 128 bit AES, none other defined atm
- encryption pass must be set in profile settings on the website
- 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.