Changes between Version 4 and Version 5 of XmlRpcIntro
- Timestamp:
- Sep 28, 2008, 12:57:13 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
XmlRpcIntro
v4 v5 1 1 = Introduction to OSDb = 2 2 3 [[PageOutline( 2, Sections)]]3 [[PageOutline(1-2, Sections)]] 4 4 5 5 This page is aimed at developers who'd like to implement the OSDb protocol and functionality into their own applications. … … 21 21 22 22 = Instructions = 23 23 24 * [wiki:DevReadFirst Read this first] 24 25 * All development testing should be pointed to: http://dev.opensubtitles.org/xml-rpc (currently offline, so use main server) 25 26 * Main/Production server XML-RPC URL: http://www.opensubtitles.org/xml-rpc 26 27 * Before developing let us know and we will assign/agree on useragent code for your application. 27 * For languages codes, 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] 28 * For gzip compression use function which adds no header to output, for PHP it's: [http://www.php.net/manual/en/function.gzcompress.php gzcompress]. For decompression use [http://www.php.net/gzuncompress gzdecompress]. 28 29 == Languages == 30 31 The API is working with either 2 (ISO 639-1) or 3-letter (ISO 639-2) language codes depending on the implementation. 32 33 To learn more, see the specifications and get language lists, visit: 34 * [http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes List of ISO 639-1 2-letter codes on Wikipedia] 35 * [http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes List of ISO 639-2 3-letter codes on Wikipedia] 36 37 You can also download [http://www.opensubtitles.org/addons/export_languages.php OS languages] table dump. 38 39 You should use '''pb/pob''' for Portuguese (Brazil). 29 40 30 41 42 == File handling == 43 44 When sending files (download, upload, etc.) files are usually sent as first gzipped (without header) then base64-encoded contents. 45 46 So when trying to get the contents you should first base64-decode, then gunzip it. 47 48 gzip compression uses a function which adds no header to output. 49 50 Here's a list of functions you can use: 51 52 ||Programming language||Compress||Decompress||Base64 encode||Base64 decode|| 53 ||PHP||[http://www.php.net/manual/en/function.gzcompress.php gzcompress]||[http://www.php.net/gzuncompress gzdecompress]||?||?|| 54 55 {{{ 56 #!html 57 <div style='color:red'>TO-DO</div> 58 }}} 59 60 61 ---- 31 62 = XML-RPC methods = 32 63 … … 64 95 == Reporting and rating == 65 96 * [wiki:XmlRpcServerInfo ServerInfo] - get basic server information and statistics 97 '''struct !ServerInfo()''' 66 98 * [wiki:XmlRpcReportMovieHash ReportMovieHash] - report wrong 67 99 * [wiki:XmlRpcSubtitlesVote SubtitlesVote] - rate subtitles 100 '''struct !SubtitlesVote(string $token, struct('idsubtitle' => int $idsubtitle, 'score' => int $score) $vote)''' 68 101 69 102 70 103 == User interface == 71 * [wiki:XmlRpcGetSubLanguages GetSubLanguages] - get support subtitle languages 104 * [wiki:XmlRpcGetSubLanguages GetSubLanguages] - get supported subtitle languages 105 '''struct !GetSubLanguages(string $language = 'en')''' 72 106 * [wiki:XmlRpcDetectLanguage DetectLanguage] - detect language for given text 73 107 * [wiki:XmlRpcGetAvailableTranslations GetAvailableTranslations] - get list of available translations for a client application 108 '''struct !GetAvailableTranslations(string $token, string $program)''' 74 109 * [wiki:XmlRpcGetTranslation GetTranslation] - get given language translation file for a client application 110 '''struct !GetTranslation(string $token, string $iso639, string $format, string $program )''' 75 111 * [wiki:XmlRpcAutoUpdate AutoUpdate] - check for latest version of a client application 112 '''struct !AutoUpdate (string $program_name)''' 76 113 77 114