Version 1 (modified by majky, 16 years ago) (diff) |
---|
Sections
InsertMovie
Intro
insert a movie into the database
Description
struct InsertMovie(string $token, struct('moviename' => string $moviename, 'movieyear' => string $movieyear) $movieinfo)
Allows registered users to insert new movies (not stored in IMDb) to the database.
Guidelines for implementation:
- when loading a movie first try to auto-detect IMDb ID from .NFO files accompanying the release.
- when uploading without IMDb ID user enters a movie title (and year) first call SearchMoviesOnIMDB().
- If this returns no matches and user checks that the movie doesn't exist on IMDb, allow to insert a new movie using this function.
- this needs to be done to avoid duplicates.
Parameters
struct( (string) [token], struct( (string) [moviename], (string) [movieyear] ) [movieinfo] )
- token
- token string identifying user's session, taken from LogIn output structure.
- movieinfo (required)
-
information about the movie to be inserted containing:
- moviename: movie title
- movieyear: release year
Return Values
Output is returned in this structure:
struct( (string) [status], (string) [id], (string) [seconds] )
and contains these elements:
- status
- function result code, see list of status codes
- id
-
- ID of the newly inserted movie in the database
- you can use it later for uploading subtitles.
- seconds
- time taken to execute this command on server
Implementations
There are currently no available sample implementations.
Changelog
Version 1: created this function
Examples
Input
<methodCall> <methodName>InsertMovie</methodName> <params> <param> <value><string>5ge539v8jsvqimnimtbcefaem1</string></value> </param> <param> <value> <struct> <member> <name>moviename</name> <value><string>Three koalas and the tiger Volume 1</string></value> </member> <member> <name>movieyear</name> <value><string>2008</string></value> </member> </struct> </value> </param> </params> </methodCall>
Output
<methodResponse> <params> <param> <value> <struct> <member> <name>status</name> <value><string>200 OK</string></value> </member> <member> <name>id</name> <value><string>10000044</string></value> </member> <member> <name>seconds</name> <value><double>0.018</double></value> </member> </struct> </value> </param> </params> </methodResponse>
Notes
none yet
See also
Comments
add your comments, hints and suggestions here if you like ...
[Prev] Home [Next]