UDP API DEV: Difference between revisions
Epoximator (talk | contribs) |
Epoximator (talk | contribs) |
||
Line 55: | Line 55: | ||
=== GROUP : new ? high === | === GROUP : new ? high === | ||
'''Command String:''' | '''Description:'''<br> | ||
Retrieves most info available for a specific group defined by either id or name. | |||
'''Command String:'''<br> | |||
by gid | |||
* GROUP gid={int4 gid} | |||
by name/shortname | |||
* GROUP name={str name} | |||
'''Possible Replies:''' | '''Possible Replies:''' | ||
* XXX NO SUCH GROUP | |||
* XXX GROUP | |||
: {int4 gid}|{int4 rating}|{int4 votes}|{int4 acount}|{int fcount}|{str name}|{str short}|{str irc}|{str url} | |||
'''Examples:''' | |||
> GROUP gid=1&s=xxxxx | |||
< 250 GROUP | |||
1|621|28|29|222|Animehaven|AH|#animehaven@irc.enterthegame.com|http://www.theanimehaven.com | |||
> GROUP name=a-l&s=xxxxx | |||
< 250 GROUP | |||
566|860|398|48|503|Anime-Legion|A-L|#anime-legion@irc.irchighway.net|http://www.anime-legion.net | |||
'''Info:''' | '''Info:''' | ||
* Login is required. (?) | |||
=== FILE ALT / FILE: new / extend ? questionable === | === FILE ALT / FILE: new / extend ? questionable === |
Revision as of 17:42, 25 November 2005
UDP DEF V0.03 DEV
- chii powr / minichii
- feel free to edit / comment / whatever
- do use discussion
- Exp will approve / disapprove
- Epoximator will implement
Data
ANIME : new ? high
Description:
Retrieves most info available for a specific anime defined by either id or name.
Command String:
by aid
- ANIME aid={int4 id}
by name
- ANIME name={str name}
Possible Replies:
- XXX NO SUCH ANIME
- XXX ANIME
- {int4 aid}|{int2 type}|{int4 eps}|{int4 ep count}|{int4 special cnt}|{int4 rating}|{int4 votes}|{int4 tmprating}|{int4 tmpvotes}|{int4 review rating average}|{int4 reviews}|{str year}|{str romaji}|{str kanji}|{str english}|{str other}|{str synonyms}|{str short names}{str genre list}
- XXX ANIME BEST MATCH
- {int4 aid}|{int2 type}|{int4 eps}|{int4 ep count}|{int4 special cnt}|{int4 rating}|{int4 votes}|{int4 tmprating}|{int4 tmpvotes}|{int4 review rating average}|{int4 reviews}|{str year}|{str romaji}|{str kanji}|{str english}|{str other}|{str synonyms}|{str short names}{str genre list}
Example: (html escaped code intended)
> ANIME name=tmm&s=xxxxx < 230 ANIME 161|52|50|0|715|57|777|35|816|1|2002-2003|TV|Tokyo Mew Mew|東京ミュウミュウ||||TMM§mew|Cat Girls > ANIME name=ナルト&s=xxxxx < 230 ANIME 239|0|140|2|1000|10|855|3750|803|36|2002-2005|TV|Naruto|ナルト||נארוטו|NARUTO§ناروتو|naruto tv§ntv|Action,Shounen,Past,...(cut)
Info:
- Login is required. (?)
- Synonyms and short names are separated with '§'
- Genre names are separated with ',' and ordered by weight (desc).
- Categories?
- By title: returns the most likely anime, i.e. only one
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 : new / extend ? high
Command String:
- by eid
- EPISODE eid={int4 eid}
Possible Replies:
- XXX NO SUCH EPISODE
- XXX EPISODE
- {int4 eid}|{str epnr}|{str romaji}|{str kanji}|{str eng}
Info:
- can be included in FILE [ALT]
GROUP : new ? high
Description:
Retrieves most info available for a specific group defined by either id or name.
Command String:
by gid
- GROUP gid={int4 gid}
by name/shortname
- GROUP name={str name}
Possible Replies:
- XXX NO SUCH GROUP
- XXX GROUP
- {int4 gid}|{int4 rating}|{int4 votes}|{int4 acount}|{int fcount}|{str name}|{str short}|{str irc}|{str url}
Examples:
> GROUP gid=1&s=xxxxx < 250 GROUP 1|621|28|29|222|Animehaven|AH|#animehaven@irc.enterthegame.com|http://www.theanimehaven.com > GROUP name=a-l&s=xxxxx < 250 GROUP 566|860|398|48|503|Anime-Legion|A-L|#anime-legion@irc.irchighway.net|http://www.anime-legion.net
Info:
- Login is required. (?)
FILE ALT / FILE: new / extend ? questionable
Command String:
- by fid:
- FILE ALT fid={int4 id}[&titletype={int 2}]
- by size+ed2k hash:
- FILE ALT size={int4 size}&ed2k={str ed2khash}[&type={int2 titletype}]
- by crc
- FILE ALT crc={str crc}[&titletype={int 2}]
- by <anime title> <ep#> <groupname>
- by <aid> <ep#> <groupname>
- by <aid> <ep#> <gid>
Possible Replies:
- XXX FILE
- {int4 fid}|{int4 aid}|{int4 eid}|{int4 gid}|{int4 lid}|{int4 state}|{int4 size}|{str ed2k}|{int2 type}{str animetitle}|{str eptitle}{str groupname}
- XXX NO SUCH FILE
Info:
- See FILE
- type: SERIES/MOVIE/OVA
- titletype: romaji, kanji, eng off
- by crc for @find command
FILE : extend ? questionable
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.
Command String: all FILE request.
FILE s={session}&size={size}&ed2k={md4}&tag={tag}&data=length,censored,md5_sum
Possible Replies:
- {int4 fid}|{int4 length in seconds}|{int4 censored}|{str md5sum}
A4G : new ? questionable
G4A : new ? questionable
STITLE : new ? questionable
- included in ANIME?
Mylist Gen
MYLIST STATS : new ? low
Command String:
- MYLIST STATS
Possible Replies:
- XXX MYLIST STATS
{animes}|{eps}|{files}|{watched}|{size}|{added animes}|{added eps}|{added files}|{added groups}|{votes}|{reviews}|{leech}|{lame}
Info:
- Only once pr update ?
- percentages: use STATS first
MYLIST LATEST : new ? questionable
Command String:
- MYLIST LATEST
Possible Replies:
- XXX MYLIST LATEST
- {int4 fid}
- {int4 fid}
- ...
Info:
- Only once pr update ?
VOTE : new ? high
Command String:
- by id
- VOTE type={int2 type}&id={int4 id}&value={int4 vote value}
- by title/name
- VOTE type={int2 type}&title={int4 id}&value={int4 vote value}
Possible Replies:
- XXX NO SUCH ENTRY
- XXX VOTED
- {str aname/ename/gname}
Info:
- type is 0=anime, 1=anime tmpvote, 2=episode, 3=group
- 'what' is aid/eid/gid/anime title/episode title/group name
RANDOM : new ? low
Command String:
- RANDOM type={int4 type}
Possible Replies:
- XXX ANIME ... (see ANIME)
Info:
- type: 0=from db, 1=watched, 2=unwatched, 3=all mylist
CREQ : new ? questionable
Command String:
- CREQ
Possible Replies:
- XXX CREQ
- ...
Mylist Edit
MYLIST ADD : extend ? low
- by <anime> <epnumber> <group>
- by <aid> <epnumber> <group>
- by last
MYLIST DEL : extend ? low
- by <anime> <epnumber> <group>
- by <aid> <epnumber> <group>
- by last
Misc : strictr time restriction?
STATS : new ? low
Command String:
- STATS
Possible Replies:
- XXX STATS
- {int4 animes)|{int4 eps}|{int4 files}|{int4 groups}|{int4 users}|{int4 creqs}
UPTIME : new ? low
Command String:
- UPTIME
Possible Replies:
- XXX UPTIME
- {int4 machine}|{int4 udpsrv}
LATEST : new ? questionable
TOP : new ? questionable
RETURN CODES
- C : current, do not change
- N : new
C 200 LOGIN_ACCEPTED C 201 LOGIN_ACCEPTED_NEW_VER C 202 LOGGED OUT C 210 MYLIST_ENTRY_ADDED C 211 ENTRY_DELETED C 220 FILE C 221 MYLIST N 222 ANIME N 223 GROUP C 270 NOTIFICATION_ENABLED C 280 PUSHACK_CONFIRMED C 290 NOTIFICATION C 291 NOTIFYLIST C 294 SENDMSG_SUCCESSFUL C 300 PONG C 310 FILE_ALREADY_IN_MYLIST C 311 MYLIST_ENTRY_EDITED C 320 NO_SUCH_FILE C 321 NO_SUCH_ENTRY N 322 NO_SUCH_ANIME N 323 NO_SUCH_GROUP C 370 NOTIFICATION_DISABLED C 380 NO_SUCH_PACKET_PENDING C 394 NO_SUCH_USER C 403 NOT_LOGGED_IN C 410 NO_SUCH_MYLIST_FILE C 411 NO_SUCH_MYLIST_ENTRY C 500 LOGIN_FAILED C 501 LOGIN_FIRST C 502 ACCESS_DENIED C 503 CLIENT_VERSION_OUTDATED C 504 CLIENT_BANNED C 505 ILLEGAL_INPUT_OR_ACCESS_DENIED C 506 INVALID_SESSION C 598 UNKNOWN_COMMAND C 6XX INTERNAL_SERVER_ERROR C 601 ANIDB_OUT_OF_SERVICE