= Introduction to OSDb = [[PageOutline(2, Sections)]] We decided use [http://www.xmlrpc.com/ XMLRPC] (see [http://www.xmlrpc.com/spec spec] and [http://www.xmlrpc.com/directory/1568/implementations implementations]) as default API for [http://www.opensubtitles.org opensubtitles.org]. Our API supports many methods so there should be no problems to code some nice client applications. [http://en.wikipedia.org/wiki/XML-RPC Wikipedia]: XML-RPC is a very simple protocol, defining only a handful of data types and commands and the entire description can be printed on two pages of paper. This is in stark contrast to most RPC systems, where the standards documents often run into the hundreds of pages and require considerable software support in order to be used. = Instructions = * [wiki:DevReadFirst Read this first] * All development testing should be pointed to: http://dev.opensubtitles.org/xml-rpc (currently offline, so use main server) * Main/Production server XMLRPC URL: http://www.opensubtitles.org/xml-rpc * Before developing let us know and we will assign/agree on useragent code for your application. * 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] * 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]. = XMLRPC methods = == Session handling == * [wiki:XmlRpcLogIn LogIn] - login user and start session '''struct !LogIn( string $username, string $password, string $language, string $useragent )''' * [wiki:XmlRpcLogOut LogOut] - logout user * [wiki:XmlRpcNoOperation NoOperation] - keep-alive user's session, verify token/session validity == Search and download == * [wiki:XmlRpcSearchSubtitles SearchSubtitles] - search for subtitles using video hashes or IMDb ID * [wiki:XmlRpcSearchToMail SearchToMail] - search for subtitles, send result to e-mail address * [wiki:XmlRpcDownloadSubtitles DownloadSubtitles] - download given subtitle files == Upload == * [wiki:XmlRpcTryUploadSubtitles TryUploadSubtitles] - check subtitles before uploading * [wiki:XmlRpcUploadSubtitles UploadSubtitles] - upload given subtitle == Movies == * [wiki:XmlRpcSearchMoviesOnIMDB SearchMoviesOnIMDB] - * [wiki:XmlRpcGetIMDBMovieDetails GetIMDBMovieDetails] - get movie details fro given IMDb ID * [wiki:XmlRpcInsertMovie InsertMovie] - insert a new movie == Reporting and rating == * [wiki:XmlRpcServerInfo ServerInfo] - get basic server information and statistics * [wiki:XmlRpcReportMovieHash ReportMovieHash] - report wrong * [wiki:XmlRpcSubtitlesVote SubtitlesVote] - rate subtitles == User interface == * [wiki:XmlRpcGetSubLanguages GetSubLanguages] - get support subtitle languages * [wiki:XmlRpcDetectLanguage DetectLanguage] - detect language for given text * [wiki:XmlRpcGetAvailableTranslations GetAvailableTranslations] - get list of available translations for a client application * [wiki:XmlRpcGetTranslation GetTranslation] - get given language translation file for a client application * [wiki:XmlRpcAutoUpdate AutoUpdate] - check for latest version of a client application == Checking == * [wiki:XmlRpcCheckMovieHash CheckMovieHash] - * [wiki:XmlRpcCheckSubHash CheckSubHash] - = Credits = * 2ge - writer of OSDb XML-RPC server-side implementation * eduo - supplier of various example inputs/outputs * all other contributors