[[PageOutline(3-4, Sections)]]
== SearchMoviesOnIMDB ==
search for a movie
=== Intro ===
----
=== Description ===
'''struct SearchMoviesOnIMDB(string $token, string $query)'''
Searches for movies matching given movie title $query.
Returns array of movies ''data'' found on IMDb.com and in internal server movie database.
Manually added movies can be identified by ID starting at 10000000.
----
=== Parameters ===
{{{
struct(
(string) [token],
(string) [query]
)
}}}
''token (required)''::
token string identifying user's session, taken from [wiki:XmlRpcLogIn LogIn] output structure.
''query (required)''::
movie title user is searching for, this is cleaned-up a bit (remove ''dvdrip'', etc.) before searching
----
=== Return Values ===
Output is returned in this structure:
{{{
struct(
(string) [status],
array(
struct(
(string) [id],
(string) [title]
) [movie],
struct(
(string) [id],
(string) [title]
) [movie],
... more movie matches go here (if any) ...
) [data],
(double) [seconds]
)
}}}
and contains these elements:
''status''::
function result code, see [wiki:XmlRpcStatusCode list of status codes]
''data''::
array containing information about movies matching given title $query
''movie''::
structure holding movie information:
* ''id'': movie's ID on IMDb
* ''title'': movie title
''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 ====
{{{
#!xml
SearchMoviesOnIMDB
tjr2fesccqriijpoc6bjda8d94
back to the future
}}}
==== Output ====
{{{
#!xml
status
200 OK
data
id
0088763
title
Back to the Future (1985)
id
0096874
title
Back to the Future Part II (1989)
... more movie matches go here (if any) ...
seconds
0.622
}}}
----
=== Notes ===
none yet
----
=== See also ===
* [wiki:XmlRpcInsertMovie InsertMovie()]
----
=== Comments ===
add your comments, hints and suggestions here if you like ...
--------
[Prev] [wiki:XmlRpcIntro Home] [Next]