Changes between Initial Version and Version 1 of XmlRpcAddComment


Ignore:
Timestamp:
Oct 13, 2008, 8:24:12 PM (16 years ago)
Author:
majky
Comment:

Created this page

Legend:

Unmodified
Added
Removed
Modified
  • XmlRpcAddComment

    v1 v1  
     1[[PageOutline(3-4, Sections)]]
     2
     3== !AddComment ==
     4
     5=== Intro ===
     6
     7  add comment to a subtitle
     8
     9
     10----
     11=== Description ===
     12
     13
     14  '''struct !AddComment(string $token, struct('idsubtitle' => int $idsubtitle, 'comment' => string $comment, 'badsubtitle' => int $badsubtitle) $data)'''
     15
     16  Allows registered users to add a new comment to subtitle.
     17 
     18
     19----
     20=== Parameters ===
     21
     22{{{
     23struct(
     24  (string) [token],
     25  struct(
     26    (int)    [idsubtitle],
     27    (string) [comment],
     28    (int)    [badsubtitle]
     29  ) [data]
     30)
     31}}}
     32
     33  ''token (required)''::
     34    token string identifying user's session, taken from [wiki:XmlRpcLogIn LogIn] output structure.
     35  ''data (required)''::
     36    comment input data structure containing:
     37      * ''idsubtitle (required)'':
     38          * subtitle identifier
     39          * BEWARE! this is not the ID of subtitle file but of the whole subtitle (a subtitle can contain multiple subtitle files)                 
     40      * ''comment (required)'': user's comment
     41      * ''badsubtitle'': optional parameter. If set to 1, subtitles are marked as bad.
     42
     43
     44----
     45=== Return Values ===
     46
     47  Output is returned in this structure:
     48{{{
     49  struct(
     50    (string) [status],
     51    (double) [seconds]
     52  )
     53}}}
     54
     55  and contains these elements:
     56    ''status''::
     57      function result code, see [wiki:XmlRpcStatusCode list of status codes]
     58    ''seconds''::
     59      time taken to execute this command on server
     60
     61
     62----
     63=== Implementations ===
     64
     65  There are currently no available sample implementations.
     66
     67
     68----
     69=== Changelog ===
     70
     71  * [2008-10-13] Version 1: created this function
     72
     73
     74----
     75=== Examples ===
     76
     77
     78==== Input ====
     79 
     80{{{
     81#!xml
     82<methodCall>
     83 <methodName>AddComment</methodName>
     84 <params>
     85  <param>
     86   <value>
     87    <string>u77pcgogdg5ttkcn9bgtvmf964</string>
     88   </value>
     89  </param>
     90  <param>
     91   <value>
     92    <struct>
     93     <member>
     94      <name>idsubtitle</name>
     95      <value><int>3322956</int></value>
     96     </member>
     97     <member>
     98      <name>comment</name>
     99      <value><string>thanks for the subtitles, I really appreciate it. Good work, keep them comin'.</string></value>
     100     </member>
     101     <member>
     102      <name>badsubtitle</name>
     103      <value><int>0</int></value>
     104     </member>
     105    </struct>
     106   </value>
     107  </param>
     108 </params>
     109</methodCall>
     110}}}
     111
     112 
     113==== Output ====
     114
     115{{{
     116#!xml
     117<methodResponse>
     118 <params>
     119  <param>
     120   <value>
     121    <struct>
     122     <member>
     123      <name>status</name>
     124      <value><string>200 OK</string></value>
     125     </member>
     126     <member>
     127      <name>seconds</name>
     128      <value><double>0.955</double></value>
     129     </member>
     130    </struct>
     131   </value>
     132  </param>
     133 </params>
     134</methodResponse>
     135}}}
     136
     137
     138----
     139=== Notes ===
     140
     141  none yet
     142
     143
     144----
     145=== See also ===
     146
     147  * [wiki:XmlRpcSubtitlesVote SubtitlesVote()]
     148
     149
     150----
     151=== Comments ===
     152
     153        add your comments, hints and suggestions here if you like ...
     154
     155
     156--------
     157[Prev] [wiki:XmlRpcIntro Home] [Next]