UDP API Definition: Difference between revisions

Line 1,676: Line 1,676:


=== MYLISTADD: Add file to mylist ===
=== MYLISTADD: Add file to mylist ===
'''Command String:'''<br>
by lid: (mylist id, edit only)
* MYLISTADD lid={int4 lid}&edit=1[&state={int2 state}&viewed={boolean viewed}&viewdate={int4 viewdate}&source={str source}&storage={str storage}&other={str other}]
by fid:
* MYLISTADD fid={int4 fid}[&state={int2 state}&viewed={boolean viewed}&viewdate={int4 viewdate}&source={str source}&storage={str storage}&other={str other}][&edit=1]
by size+ed2k hash:
* MYLISTADD size={int4 size}&ed2k={str ed2khash}[&state={int2 state}&viewed={boolean viewed}&viewdate={int4 viewdate}&source={str source}&storage={str storage}&other={str other}][&edit=1]
by anime + generic + epno
* MYLISTADD aname={str anime name}&generic=1[&epno={int4 episode number}][&state={int2 state}&viewed={boolean viewed}&viewdate={int4 viewdate}&source={str source}&storage={str storage}&other={str other}][&edit=1]
by anime + group + epno
* MYLISTADD aname={str anime name}[&gname={str group name}&epno={int4 episode number}][&state={int2 state}&viewed={boolean viewed}&viewdate={int4 viewdate}&source={str source}&storage={str storage}&other={str other}][&edit=1]


* MYLISTADD aname={str anime name}&gid={int4 group id}[&epno={int4 episode number}][...]
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.
* MYLISTADD aname={str anime name}&edit=1[&gid={int4 group id}&epno={int4 episode number}][...]
 
* MYLISTADD aid={int4 anime id}&gname={str group name}[&epno={int4 episode number}][...]
 
* MYLISTADD aid={int4 anime id}&generic=1&epno={int4 episode number}][...]
'''Adding a single file to the MyList with the 'fileinfo' block'''
* MYLISTADD aid={int4 anime id}&edit=1[&gname={str group name}&epno={int4 episode number}][...]
 
* MYLISTADD aid={int4 anime id}&gid={int4 group id}[&epno={int4 episode number}][...]
* MYLISTADD fid={int4 fid}
* MYLISTADD aid={int4 anime id}&edit=1[&gid={int4 group id}&epno={int4 episode number}][...]
'''or'''
* MYLISTADD size={int4 size}&ed2k={str ed2khash}
'''or'''
* MYLISTADD lid={int4 lid}&edit=1  (valid for edit only)
 
 
'''Adding one or more files to the MyList with the 'animeinfo'/'groupinfo'/'episodeinfo' block'''
 
Here, you have a number of options, depending on what data you have available. In brief, 'animeinfo' represents a choice between anime id and anime name. 'groupinfo' represents a choice between group id, group name, and generic=1.  'episodeinfo' represents a range of one or more episodes.
 
 
* MYLISTADD aid={int4 aid}&gid={int gid}&epno={int4 episode number}
'''or'''
* MYLISTADD aid={int4 aid}&gname={str group_name}&epno={int4 episode number}
'''or'''
* MYLISTADD aid={int4 aid}&generic=1&epno={int4 episode number}
'''or'''
* MYLISTADD aname={str anime_name}&gid={int gid}&epno={int4 episode number}
'''or'''
* MYLISTADD aname={str anime_name}&gname={str group_name}&epno={int4 episode number}
'''or'''
* MYLISTADD aname={str anime_name}&generic=1&epno={int4 episode number}
 
 
Each command listed can have, in addition, a number of optional components to provide further MyList details. Append these as desired.
 
* &state={int2 state}
* &viewed={boolean viewed}
* &viewdate={int4 viewdate}
* &source={str source}
* &storage={str storage}
* &other={str other}
 
 
Finally, edit=1 can be included to edit a mylist entry instead of creating a new one.  When editing, optional values that are not supplied retain their original value. That is, they are ''not'' replaced with default or empty values. Only values supplied are updated.


'''Possible Replies:'''
'''Possible Replies:'''
Line 1,718: Line 1,741:
* 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.
* Viewdate is optional; the current time will be used if not defined. 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;
* If edit is 1 then an existing entry, if found, will be updated with the given values.
* For state values refer to: '''MYLIST'''
* For state values refer to: '''MYLIST'''
* If you want to change an existing entry and already know its mylist id (lid) please use the lid-version of this command. It put less load on the server.
* If you want to change an existing entry and already know its mylist id (lid) please use the lid-version of this command. It put less load on the server.
MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.