PFS2: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 1: Line 1:
== Request ==
== Request ==
Current PFS parameters
  mimetype=application/x-java-appletapp
  mimetype=application/x-java-appletapp
  ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
  ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
Line 5: Line 6:
  clientOS=Win
  clientOS=Win
  chromeLocale=en-US
  chromeLocale=en-US
Current VersionCheck parameters:
reqVersion=1
id={49f3fc85-dcfe-4e42-9301-226ebe658509}
version=0.6.1
maxAppVersion=2.0.0.*
status=userEnabled,incompatible
appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
appVersion=3.0b3pre
appOS=Darwin
appABI=x86-gcc3
locale=en-US


== Response ==
== Response ==

Revision as of 00:33, 11 March 2009

Request

Current PFS parameters

mimetype=application/x-java-appletapp
ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
appVersion=1.5.0.4
clientOS=Win
chromeLocale=en-US

Current VersionCheck parameters:

reqVersion=1
id={49f3fc85-dcfe-4e42-9301-226ebe658509}
version=0.6.1
maxAppVersion=2.0.0.*
status=userEnabled,incompatible
appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
appVersion=3.0b3pre
appOS=Darwin
appABI=x86-gcc3
locale=en-US

Response

Is the following data a sample of the JSON output of PFS2?

[ {
  "name" : "Plugin",
  "version" : "1.0",
  "filename" : "plugin.dll",
  "vendor" : "Mozilla",
  "url" : "http://mozilla.com/",
  "icon_url" : "http://mozilla.com/favicon.ico",
  "latest_version" : "1.0",
  "installer_location" : "http://mozilla.com/installer.exe",
  "installer_hash" : "sha256:592eca7e6f2731c65e344c4514bd7efa0a7ec8a203d97b4f5aadb14c44379178",
  "installer_shows_ui" : "false",
  "license_url" : "http://mozilla.com/license.html",
  "needs_restart" : "true",
  "description" : "This is a Mozilla plugin that does things.",
  "platforms" : [
    { "name" : "Mac OSX" },
    { "name" : "Windows NT 6.0" } 
  ], 
  "xpcomabi" : "x86",
  "mime_types" : [ { 
    "mime" : "text/plain",
    "description" : "HTML",
    "suffixes" : ".html, .xhtml, .htm"
  } ]
} ]

Q&A

  • What is the API for a request in PFS2?
    • Will add this to the "request" section but it will look a lot like a cross between the extension update service and the URLs used for PFS currently
  • Is it a GET with query string like PFS, or is it a POST with a JSON encoded body (like one below with less info)?
    • I think it's pretty easy to handle either case, but since we'd potentially be dealing with arrays of plugins I'd opt to accept a JSON body and have the app run logic on it.
    • One argument against using POST is that doing so doesn't give you a good cache hit rate and could possibly crush the service doing operations that otherwise could be easily cached (albeit with an increase in HTTP requests).
  • Will there be a batch request mode, or 1 request per plugin?
    • Leaning towards 1 request per plugin at this point, but we should take some time to figure out which solution is best.