Jdlrobson added a comment.

  > My concern is from the perspective of the core API: it has a specific 
contract, and it should not be used for things that do not match that contract. 
The contract is: "Searches wiki page titles, and returns pages with titles that 
begin with the provided search terms."
  
  I understand and I'm saying that this could be implemented using an 
abstracted PHP interface which provides a contract for the format in the 
response, without having any knowledge of the implementation.
  
  > The problem is that Wikibase can't really use the same spec
  
  When I mean spec, I'm referring to the output API.
  
  For example, 
https://en.wikipedia.org/w/rest.php/v1/search/title?q=Spongebob%20Squarepants%20&limit=10
 responds with :
  
    {
      "pages": [
        {
          "id": 2655089,
          "key": "SpongeBob_SquarePants",
          "title": "SpongeBob SquarePants",
          "excerpt": "SpongeBob SquarePants",
          "description": "American animated television series",
          "thumbnail": {
            "mimetype": "image/svg+xml",
            "size": 25839,
            "width": 200,
            "height": 107,
            "duration": null,
            "url": 
"//upload.wikimedia.org/wikipedia/en/thumb/2/22/SpongeBob_SquarePants_logo_by_Nickelodeon.svg/200px-SpongeBob_SquarePants_logo_by_Nickelodeon.svg.png"
          }
        }
    ..
      ]
    }
  
  If an API was created that returned data in the same format, the search UI 
would mostly function.
  
    {
      "pages": [
        {
          "key": "Q935079",
          "title": "SpongeBob SquarePants (Q935079)",
          "excerpt": "main character of the animated television show SpongeBob 
SquarePants",
          "description": null,
          "thumbnail": {
            "mimetype": "image/svg+xml",
            "size": 25839,
            "width": 200,
            "height": 107,
            "duration": null,
            "url": 
"//upload.wikimedia.org/wikipedia/en/thumb/2/22/SpongeBob_SquarePants_logo_by_Nickelodeon.svg/200px-SpongeBob_SquarePants_logo_by_Nickelodeon.svg.png"
          }
      ]
    }
    
    The implementation can be completely different, living in Wikidata if 
necessary. Right now, we allow configuration on the host level, but if this is 
the direction we want to take, we can make the path configurable our side to to 
support this.
    
    I honestly don't see any other way to get this to work, without disabling 
the JavaScript search experience altogether and relying on a gadget.

TASK DETAIL
  https://phabricator.wikimedia.org/T275251

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jdlrobson
Cc: darthmon_wmde, WMDE-leszek, daniel, sdkim, alexhollender, LGoto, Yair_rand, 
MPhamWMF, ovasileva, Addshore, Lydia_Pintscher, Aklapper, Jdlrobson, Invadibot, 
Selby, caldera, maantietaja, Akuckartz, Demian, WDoranWMF, holger.knust, 
EvanProdromou, DannyS712, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, 
pmiazga, LawExplorer, Winter, JJMC89, Iniquity, _jensen, rosalieper, Agabi10, 
Scott_WUaS, Pchelolo, Jonas, Volker_E, Niedzielski, Izno, Wikidata-bugs, aude, 
GWicke, Dinoguy1000, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to