Changes between Version 102 and Version 103 of XMLRPC


Ignore:
Timestamp:
May 31, 2016, 6:01:19 AM (8 years ago)
Author:
os
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XMLRPC

    v102 v103  
    956956All field are self-explained.
    957957
     958----
     959
     960== !QuickSuggest ==
     961'''array !QuickSuggest( $token, $string, $sublanguageid )'''
     962
     963This method is useful, when user is typing movie name in search subtitles area. Use-case scenario - user is in search subtitles pane of program, and searching for subtitles. He start typing, and this method returns count of existing subtitles for given languages, then he select some movie, and !SearchSubtitles by IDMovieIMDB is performed. $sublanguageid can be more languages "eng,por,pob" for example. The results are ordered by popularity of movie, the !SubtitlesFound is always higher than 0. This method is not suitable to implement in Upload area of program (because only existing IMDBIDs are returned which got suitable subtitles). $sublanguageid is optional, if not specified ($sublanguage == 'all'), then for all languages is suggestion made, so it is good idea to pass user-defined subtitle language(s) here.
     964
     965We are using exactly same logic and data on website, the URL for JSON output is http://www.opensubtitles.org/libs/suggest.php?format=json3&MovieName=m&SubLanguageID=eng,por,pob - but if possible use xml-rpc method.
     966
     967Example output for $string = 'm':
     968{{{
     969Array
     970(
     971    [status] => 200 OK
     972    [data] => Array
     973        (
     974            [0] => Array
     975                (
     976                    [SubtitlesFound] => 70
     977                    [MovieName] => Martian
     978                    [MovieYear] => 2015
     979                    [IDMovieIMDB] => 3659388
     980                    [MovieKind] => movie
     981                    [MovieImdbRating] => 8.1
     982                )
     983
     984            [1] => Array
     985                (
     986                    [SubtitlesFound] => 2133
     987                    [MovieName] => Modern Family
     988                    [MovieYear] => 2009
     989                    [IDMovieIMDB] => 1442437
     990                    [MovieKind] => tv
     991                    [MovieImdbRating] => 8.6
     992                )
     993
     994            [2] => Array
     995                (
     996                    [SubtitlesFound] => 51
     997                    [MovieName] => Minions
     998                    [MovieYear] => 2015
     999                    [IDMovieIMDB] => 2293640
     1000                    [MovieKind] => movie
     1001                    [MovieImdbRating] => 6.5
     1002                )
     1003
     1004            [3] => Array
     1005                (
     1006                    [SubtitlesFound] => 60
     1007                    [MovieName] => Mission: Impossible - Rogue
     1008                    [MovieYear] => 2015
     1009                    [IDMovieIMDB] => 2381249
     1010                    [MovieKind] => movie
     1011                    [MovieImdbRating] => 7.5
     1012                )
     1013
     1014            [4] => Array
     1015                (
     1016                    [SubtitlesFound] => 8
     1017                    [MovieName] => Mr. Right
     1018                    [MovieYear] => 2015
     1019                    [IDMovieIMDB] => 2091935
     1020                    [MovieKind] => movie
     1021                    [MovieImdbRating] => 6.3
     1022                )
     1023
     1024        )
     1025
     1026    [seconds] => 0.002
     1027)
     1028}}}
     1029
     1030'''Fields explanation:'''
     1031All field are self-explained.
    9581032
    9591033----