Changes between Initial Version and Version 1 of XML-RPC-debugger


Ignore:
Timestamp:
Oct 3, 2010, 5:26:04 AM (14 years ago)
Author:
os
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XML-RPC-debugger

    v1 v1  
     1== Testing OS API without programming ==
     2
     3Steps:
     4
     51. Go to http://www.opensubtitles.org/addons/xml-rpc/debugger/
     62. Fill: Address: '''api.opensubtitles.org''', Port: '''80''', Path: '''/xml-rpc'''
     73. Check '''Execute method'''
     84. Method Name: "'''LogIn'''", put in Payload this:
     9
     10{{{
     11<param>
     12<value><string></string></value>
     13</param>
     14<param>
     15<value><string></string></value>
     16</param>
     17<param>
     18<value><string></string></value>
     19</param>
     20<param>
     21<value><string>OS Test User Agent</string></value>
     22</param>
     23}}}
     24
     255. press '''execute''' button
     26
     276. In response you will get something like:
     28
     29{{{
     30<member>
     31<name>token</name>
     32<value><string>oujbupj6fek9mc433qipaka1r2</string></value>
     33}}}
     34 
     35take string (token) like "oujbupj6fek9mc433qipaka1r2" in our case, and:
     36
     377. put into Method Name: '''SearchSubtitles''', replace token with your, put in payload:
     38
     39{{{
     40  <param>
     41   <value><string>oujbupj6fek9mc433qipaka1r2</string></value>
     42  </param>
     43  <param>
     44   <value>
     45    <array>
     46     <data>
     47      <value>
     48       <struct>
     49        <member>
     50         <name>sublanguageid</name>
     51         <value><string>cze,eng,ger,slo</string>
     52         </value>
     53        </member>
     54        <member>
     55         <name>moviehash</name>
     56         <value><string>7d9cd5def91c9432</string></value>
     57        </member>
     58        <member>
     59         <name>moviebytesize</name>
     60         <value><double>735934464</double></value>
     61        </member>
     62       </struct>
     63      </value>
     64     </data>
     65    </array>
     66   </value>
     67  </param>
     68}}}
     69
     70and you should get response like:
     71
     72
     73{{{
     74<methodResponse> <params> <param> <value><struct> <member><name>status</name> <value><string>200 OK</string></value> </member> <member><name>data</name> <value><array> <data> <value><struct> <member><name>MatchedBy</name> <value><string>moviehash</string></value> </member> <member><name>IDSubMovieFile</name> <value><string>143481</string></value> </member> <member><name>MovieHash</name> <value><string>7d9cd5def91c9432</string></value> ...
     75}}}
     76
     77remember:
     78 * you must use valid useragent (test user agent is valid one for test purposes only)
     79 * your session must be valid (so don't call SearchSubtitles() after 30 minutes after LogIn(), session might be expired)
     80 
     81