wiki:XmlRpcSearchMoviesOnIMDB

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 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 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

<methodCall>
 <methodName>SearchMoviesOnIMDB</methodName>
 <params>
  <param>
   <value><string>tjr2fesccqriijpoc6bjda8d94</string></value>
  </param>
  <param>
   <value><string>back to the future</string></value>
  </param>
 </params>
</methodCall>

Output

<methodResponse>
 <params>
  <param>
   <value>
    <struct>
     <member>
      <name>status</name>
      <value><string>200 OK</string></value>
     </member>
     <member>
      <name>data</name>
      <value>
       <array>
        <data>
         <value>
          <struct>
           <member>
            <name>id</name>
            <value><string>0088763</string></value>
           </member>
           <member>
            <name>title</name>
            <value><string>Back to the Future (1985)</string></value>
           </member>
          </struct>
         </value>
         <value>
          <struct>
           <member>
            <name>id</name>
            <value><string>0096874</string></value>
           </member>
           <member>
            <name>title</name>
            <value><string>Back to the Future Part II (1989)</string></value>
           </member>
          </struct>
         </value>
         
         ... more movie matches go here (if any) ...
         
        </data>
       </array>
      </value>
     </member>
     <member>
      <name>seconds</name>
      <value>
       <double>0.622</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]

Last modified 16 years ago Last modified on Oct 12, 2008, 4:11:10 PM