Changes between Version 1 and Version 2 of XMLRPC


Ignore:
Timestamp:
Jul 17, 2008, 10:10:45 AM (16 years ago)
Author:
os
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XMLRPC

    v1 v2  
    1111= Instructions =
    1212
    13  * All developing tests do on: http://dev.opensubtitles.org/xml-rpc
     13 * All developing tests do on: http://dev.opensubtitles.org/xml-rpc (currently offline, so do it on main server:)
    1414 * Main server is: http://www.opensubtitles.org/xml-rpc
    1515 * Before developing and if you use this API let us know, we assign useragent to you, empty useragent will not work
    1616 * If you use language, check [http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes ISO639], use '''pb/pob''' for Portuguese (Brazil) - [http://www.opensubtitles.org/addons/export_languages.php Download OS languages table dump]
     17 * for gzip compression use function/method which adds no header to output, for php it is: [http://www.php.net/manual/en/function.gzcompress.php gzcompress]
    1718
    1819= XMLRPC methods =
     
    328329'''Fields explanation:'''
    329330data is absolute link to subtitles.
     331----
     332
     333== !DetectLanguage ==
     334
     335'''array !DetectLanguage( $token, array($text, $text, ...) )'''
     336
     337Returns array of MD5 => ISO639-2 language codes, trying to detect language for given $text. Note: $text MUST be base64 encoded and should be gzipped (without header), for save some bandwidth and for better speed. MD5 is md5() of unpacked text, input text should be up to 4096 bytes long for good results - but you can send all contents of subtitles. [http://www.boxoffice.ch/pseudo/ PHP textcat]
     338
     339Example output:
     340{{{
     341    [status] => 200 OK
     342    [data] => Array
     343       (
     344            [9e107d9d372bb6826bd81d3542a419d6] => eng
     345            [ffd93f16876049265fbaef4da268dd0e] => cze
     346            ...
     347       )
     348    [seconds] => 0.625
     349}}}
     350
     351Fields explanation: All fields are self-explained. Note: if you get instead of 3 characters language some other languagename - please contact us with input/output text (for example scots)
    330352
    331353----