UDP API Definition: Difference between revisions

m
Fix typo in return code 282 name (NOTIFYACK_SUCCESSFUL_NOTIFICATION -- was [...]_NOTIFIATION)
(→‎VOTE: Vote for specified anime/episode/group: str actually works for epno as discussed here: https://anidb.net/post459995)
m (Fix typo in return code 282 name (NOTIFYACK_SUCCESSFUL_NOTIFICATION -- was [...]_NOTIFIATION))
 
(2 intermediate revisions by one other user not shown)
Line 1,939: Line 1,939:
by id
by id
* VOTE type={int2 type}&id={int4 id}[&value={int4 vote value}&epno={int4 episode number}]
* VOTE type={int2 type}&id={int4 id}[&value={int4 vote value}&epno={int4 episode number}]
* VOTE type={int2 type}&id={int4 id}[&value={int4 vote value}&epno={str episode number}]
by name
by name
* VOTE type={int2 type}&name={string name}[&value={int4 vote value}&epno={int4 episode number}]
* VOTE type={int2 type}&name={string name}[&value={int4 vote value}&epno={int4 episode number}]
{{eyecatch|Note|To vote for non-regular episodes (S, C, T, O, P episodes), the epno parameter actually accepts str as well.  This is unofficial, so use at your own risk.
* VOTE type={int2 type}&name={string name}[&value={int4 vote value}&epno={str episode number}]
* <nowiki>VOTE type={int2 type}&id={int4 id}[&value={int4 vote value}&epno={str episode number}]</nowiki>
* <nowiki>VOTE type={int2 type}&name={string name}[&value={int4 vote value}&epno={str episode number}]</nowiki>
'''Example:'''
  <nowiki>VOTE type=1&id=5101&value=950&epno=S2</nowiki>
  260 VOTED
  <nowiki>Another World: Tomoyo Arc|950|1|91981</nowiki>}}


'''Possible Replies:'''
'''Possible Replies:'''
Line 1,966: Line 1,961:
* 364 ALREADY PERMVOTED
* 364 ALREADY PERMVOTED
: {str entity name}|{existing vote value}|{vote type}|{entity id}
: {str entity name}|{existing vote value}|{vote type}|{entity id}
'''Example:'''
  VOTE type=1&id=5101&value=950
  260 VOTED
  Clannad|950|1|5101
  VOTE type=1&id=5101&value=950&epno=S2
  260 VOTED
  Another World: Tomoyo Arc|950|1|91981
  VOTE type=6&id=91981&value=950
  260 VOTED
  Another World: Tomoyo Arc|950|1|91981


'''Info:'''
'''Info:'''
* type: 1=anime, 2=anime tmpvote, 3=group
* Type: 1=anime, 2=anime tmpvote, 3=group, 6=episode
* entity: anime, episode, or group
* Entity: anime, episode, or group
* for episode voting add epno on type=1
* For episode voting add epno on type=1, or specify type=6 if eid is known
* value: negative number means revoke, 0 means retrieve (default), 100-1000 are valid vote values, rest is illegal
* Value: negative number means revoke, 0 means retrieve (default), 100-1000 are valid vote values, rest is illegal
* votes will be updated automatically (no questions asked)
* Votes will be updated automatically (no questions asked)
* tmpvoting when there exist a perm vote is not possible
* Tmpvoting when there exist a perm vote is not possible


----
----
Line 2,202: Line 2,210:
NOTIFICATION_ENABLED                    = 270
NOTIFICATION_ENABLED                    = 270
NOTIFYACK_SUCCESSFUL_MESSAGE            = 281
NOTIFYACK_SUCCESSFUL_MESSAGE            = 281
NOTIFYACK_SUCCESSFUL_NOTIFIATION        = 282
NOTIFYACK_SUCCESSFUL_NOTIFICATION        = 282
NOTIFICATION_STATE                      = 290
NOTIFICATION_STATE                      = 290
NOTIFYLIST                              = 291
NOTIFYLIST                              = 291
MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.