wiki:XmlRpcIntro

Version 4 (modified by guest, 16 years ago) (diff)

Oooops ;) [Majky]

Introduction to OSDb

This page is aimed at developers who'd like to implement the OSDb protocol and functionality into their own applications. Here'll you'll find the API specifications for all available functions along with structure definitions and useful hints.

Our API is based on XML-RPC so you might want to take a look at its specifications and implementations.

Our API supports many methods so there should be no problem to code some nice client applications.

If you're missing any method feel free to contact us on the forum to discuss possibilities.

Short Wikipedia excerpt about XML-RPC: 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

XML-RPC methods

Session handling

  • LogIn - login user and start session

struct LogIn(string $username, string $password, string $language, string $useragent)

  • LogOut - logout user and end session

struct LogOut(string $token)

  • NoOperation - keep-alive user's session, verify token/session validity

struct NoOperation(string $token)

Search and download

struct SearchSubtitles(string $token, array(struct('sublanguageid' => string $sublanguageid, 'moviehash' => string $moviehash, 'moviebytesize' => int $moviesize, 'imdbid' => string $imdbid ), struct(...)))

  • SearchToMail - search for subtitles, send results to user's e-mail address

struct SearchToMail(string $token, array($sublanguageid, $sublanguageid, ...) $sublangs, array(struct('moviehash' => string $moviehash, 'moviesize' => double $moviesize), ...))

struct DownloadSubtitles(string $token, array($IDSubtitleFile, $IDSubtitleFile,...) $data)

Upload

struct TryUploadSubtitles(string $token, struct('cd1' => struct('subhash' => string $submd5hash, 'subfilename' => string $subfilename, 'moviehash' => string $moviehash, 'moviebytesize' => string double $moviesize, 'movietimems' => int $movietimems, 'movieframes' => int $movieframes, 'moviefps' => double $moviefps, 'moviefilename' => string $moviefilename) $subfile, 'cd2' => struct(...) $subfile) $subs)

struct UploadSubtitles(string $token, struct('baseinfo' => struct('idmovieimdb' => string $idmovieimdb, 'moviereleasename' => string $scene_releasename, 'movieaka' => string $aka_in_subtitle_language, 'sublanguageid' => string $sublanguageid, 'subauthorcomment' => string $author_comment), 'cd1' => struct('subhash' => string $md5subhash, 'subfilename' => string $subfilename, 'moviehash' => string $moviehash, 'moviebytesize' => double $moviebytesize, 'movietimems' => int $movietimems, 'moviefps' => double $moviefps, 'movieframes' => int $movieframes, 'moviefilename' => string $moviefilename, 'subcontent' => string $subtitlecontent), 'cd2' => struct(...)))

Movies

Reporting and rating

User interface

Checking

Credits

  • 2ge - writer of OSDb XML-RPC server-side implementation
  • eduo - supplier of various example inputs/outputs
  • all other contributors