| 1 | == Testing OS API without programming == |
| 2 | |
| 3 | Steps: |
| 4 | |
| 5 | 1. Go to http://www.opensubtitles.org/addons/xml-rpc/debugger/ |
| 6 | 2. Fill: Address: '''api.opensubtitles.org''', Port: '''80''', Path: '''/xml-rpc''' |
| 7 | 3. Check '''Execute method''' |
| 8 | 4. 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 | |
| 25 | 5. press '''execute''' button |
| 26 | |
| 27 | 6. In response you will get something like: |
| 28 | |
| 29 | {{{ |
| 30 | <member> |
| 31 | <name>token</name> |
| 32 | <value><string>oujbupj6fek9mc433qipaka1r2</string></value> |
| 33 | }}} |
| 34 | |
| 35 | take string (token) like "oujbupj6fek9mc433qipaka1r2" in our case, and: |
| 36 | |
| 37 | 7. 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 | |
| 70 | and 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 | |
| 77 | remember: |
| 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 | |