Index: chrome/common/extensions/api/downloads.json |
diff --git a/chrome/common/extensions/api/downloads.json b/chrome/common/extensions/api/downloads.json |
new file mode 100644 |
index 0000000000000000000000000000000000000000..23a02cbbb7136e885f02b18f9025cb5053ac079e |
--- /dev/null |
+++ b/chrome/common/extensions/api/downloads.json |
@@ -0,0 +1,1207 @@ |
+[ |
+ { |
+ "documentation_permissions_required": [ |
+ "downloads" |
+ ], |
+ "events": [ |
+ { |
+ "description": "This event fires with the DownloadItem object when a download begins.", |
mkearney
2012/06/14 15:12:28
This should link to DownloadItem
benjhayden
2012/06/14 16:44:13
Done.
|
+ "name": "onCreated", |
+ "parameters": [ |
+ { |
+ "$ref": "DownloadItem", |
+ "name": "downloadItem" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Fires with the download id when a download is erased from history.", |
mkearney
2012/06/14 15:12:28
I would make this downloadId in code brackets.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "name": "onErased", |
+ "parameters": [ |
+ { |
+ "name": "downloadId", |
+ "type": "integer" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "When any of a DownloadItem's properties except <code>bytesReceived</code> changes, this event fires with the download id and an object containing the properties that changed.", |
mkearney
2012/06/14 15:12:28
Again, this should be a link to DownloadItem
mkearney
2012/06/14 15:12:28
Again, make this downloadId in code brackets.
benjhayden
2012/06/14 16:44:13
Done.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "name": "onChanged", |
+ "parameters": [ |
+ { |
+ "name": "downloadDelta", |
+ "properties": { |
+ "danger": { |
+ "description": "Describes a change in a DownloadItem's <code>danger</code>.", |
mkearney
2012/06/14 15:12:28
General comment to sweep DownloadItem.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "dangerAccepted": { |
+ "description": "Describes a change in a DownloadItem's <code>dangerAccepted</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "boolean" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "endTime": { |
+ "description": "Describes a change in a DownloadItem's <code>endTime</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "error": { |
+ "description": "Describes a change in a DownloadItem's <code>error</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "fileSize": { |
+ "description": "Describes a change in a DownloadItem's <code>fileSize</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "filename": { |
+ "description": "Describes a change in a DownloadItem's <code>filename</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "id": { |
+ "description": "An identifier that is persistent across browser sessions.", |
+ "type": "integer" |
+ }, |
+ "mime": { |
+ "description": "Describes a change in a DownloadItem's <code>mime</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "paused": { |
+ "description": "Describes a change in a DownloadItem's <code>paused</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "boolean" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "startTime": { |
+ "description": "Describes a change in a DownloadItem's <code>startTime</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "state": { |
+ "description": "Describes a change in a DownloadItem's <code>state</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "totalBytes": { |
+ "description": "Describes a change in a DownloadItem's <code>totalBytes</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "url": { |
+ "description": "Describes a change in a DownloadItem's <code>url</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ } |
+ }, |
+ "type": "object" |
+ } |
+ ], |
+ "type": "function" |
+ } |
+ ], |
+ "functions": [ |
+ { |
+ "description": "Download a URL. If the URL uses the HTTP[S] protocol, then the request will include all cookies currently set for its hostname. If both <code>filename</code> and <code>saveAs</code> are specified, then the Save As dialog will be displayed, pre-populated with the specified <code>filename</code>. If the download started successfully, <code>callback</code> will be called with the new DownloadItem's <code>downloadId</code>. If there was an error starting the download, then <code>callback</code> will be called with <code>downloadId=undefined</code> and <a href='extension.html#property-lastError'>chrome.extension.lastError</a> will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. You must not parse it.", |
+ "name": "download", |
+ "parameters": [ |
+ { |
+ "description": "What to download and how.", |
+ "name": "options", |
+ "properties": { |
+ "body": { |
+ "description": "post body", |
mkearney
2012/06/14 15:12:28
Capitalize post and add a full-stop.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "filename": { |
+ "description": "A file path relative to the Downloads directory to contain the downloaded file.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "headers": { |
+ "description": "Extra HTTP headers to send with the request if the URL uses the HTTP[s] protocol. Each header is represented as a dictionary containing the keys <code>name</code> and either <code>value</code> or <code>binaryValue</code>, restricted to those allowed by XMLHttpRequest.", |
+ "items": { |
+ "properties": { |
+ "name": { |
+ "description": "Name of the HTTP header.", |
+ "type": "string" |
+ }, |
+ "value": { |
+ "description": "Value of the HTTP header.", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "optional": true, |
+ "type": "array" |
+ }, |
+ "method": { |
+ "description": "The HTTP method to use if the URL uses the HTTP[S] protocol.", |
+ "enum": [ |
+ "GET", |
+ "POST" |
+ ], |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "saveAs": { |
+ "description": "Use a file-chooser to allow the user to select a filename.", |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "url": { |
+ "description": "The URL to download.", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "name": "DownloadCallback", |
+ "optional": true, |
+ "parameters": [ |
+ { |
+ "name": "downloadId", |
+ "type": "integer" |
+ } |
+ ], |
+ "type": "function" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Find DownloadItems. Set <code>query</code> to the empty object to get all DownloadItems. To get a specific DownloadItem, set only the <code>id</code> field.", |
+ "name": "search", |
+ "parameters": [ |
+ { |
+ "name": "query", |
+ "properties": { |
+ "bytesReceived": { |
+ "description": "Number of bytes received so far from the host, without considering file compression.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "danger": { |
+ "$ref": "DangerType", |
+ "description": "Indication of whether this download is thought to be safe or known to be suspicious.", |
+ "optional": true |
+ }, |
+ "dangerAccepted": { |
+ "description": "true if the user has accepted the download's danger.", |
mkearney
2012/06/14 15:12:28
Capitalize true.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "endTime": { |
+ "description": "Number of milliseconds between the unix epoch and when this download ended.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "endedAfter": { |
+ "description": "Limits results to downloads that ended after the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "endedBefore": { |
+ "description": "Limits results to downloads that ended before the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "error": { |
+ "description": "Number indicating why a download was interrupted.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "fileSize": { |
+ "description": "Number of bytes in the whole file post-decompression, or -1 if unknown.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "filename": { |
+ "description": "absolute local path", |
mkearney
2012/06/14 15:12:28
Capitalize absolute and add full-stop.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "filenameRegex": { |
+ "description": "Limits results to downloads whose filename matches the given regular expression.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "id": { |
+ "description": "An identifier that is persistent across browser sessions.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "limit": { |
+ "description": "Setting this integer limits the number of results. Otherwise, all matching DownloadItems will be returned.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "mime": { |
+ "description": "The file's MIME type.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "orderBy": { |
+ "description": "Setting this string to a DownloadItem property sorts the DownloadItems prior to applying the above filters. For example, setting <code>orderBy='startTime'</code> sorts the DownloadItems by their start time in ascending order. To specify descending order, prefix <code>orderBy</code> with a hyphen: '-startTime'.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "paused": { |
+ "description": "true if the download has stopped reading data from the host, but kept the connection open.", |
mkearney
2012/06/14 15:12:28
Capitalize true.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "query": { |
+ "description": "This space-separated string of search terms that may be grouped using quotation marks limits results to downloads whose filename or url contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash.", |
mkearney
2012/06/14 15:12:28
url should be URL.
benjhayden
2012/06/14 16:44:13
I added code tags and a link to DownloadItem inste
|
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "startTime": { |
+ "description": "Number of milliseconds between the unix epoch and when this download began.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "startedAfter": { |
+ "description": "Limits results to downloads that started after the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "startedBefore": { |
+ "description": "Limits results to downloads that started before the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "state": { |
+ "$ref": "State", |
+ "description": "Indicates whether the download is progressing, interrupted, or complete.", |
+ "optional": true |
+ }, |
+ "totalBytes": { |
+ "description": "Number of bytes in the whole file, without considering file compression, or -1 if unknown.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "totalBytesGreater": { |
+ "description": "Limits results to downloads whose totalBytes is greater than the given integer.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "totalBytesLess": { |
+ "description": "Limits results to downloads whose totalBytes is less than the given integer.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "url": { |
+ "description": "absolute URL", |
mkearney
2012/06/14 15:12:28
Capitalize absolute and add full-stop.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "urlRegex": { |
+ "description": "Limits results to downloads whose url matches the given regular expression.", |
mkearney
2012/06/14 15:12:28
url should be URL.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "name": "SearchCallback", |
+ "parameters": [ |
+ { |
+ "items": { |
+ "$ref": "DownloadItem" |
+ }, |
+ "name": "results", |
+ "type": "array" |
+ } |
+ ], |
+ "type": "function" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Pause the download. If the request was successful the download is in a paused state. Otherwise <a href='extension.html#property-lastError'>chrome.extension.lastError</a> contains an error message. The request will fail if the download is not active.", |
+ "name": "pause", |
+ "parameters": [ |
+ { |
+ "description": "The id of the download to pause.", |
+ "name": "downloadId", |
+ "type": "integer" |
+ }, |
+ { |
+ "name": "NullCallback", |
+ "optional": true, |
+ "parameters": [], |
+ "type": "function" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise <a href='extension.html#property-lastError'>chrome.extension.lastError</a> contains an error message. The request will fail if the download is not active.", |
+ "name": "resume", |
+ "parameters": [ |
+ { |
+ "description": "The id of the download to resume.", |
+ "name": "downloadId", |
+ "type": "integer" |
+ }, |
+ { |
+ "name": "NullCallback", |
+ "optional": true, |
+ "parameters": [], |
+ "type": "function" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Cancel a download. When <code>callback</code> is run, the download is cancelled, completed, interrupted or doesn't exist anymore.", |
+ "name": "cancel", |
+ "parameters": [ |
+ { |
+ "description": "The id of the download to cancel.", |
+ "name": "downloadId", |
+ "type": "integer" |
+ }, |
+ { |
+ "name": "NullCallback", |
+ "optional": true, |
+ "parameters": [], |
+ "type": "function" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, <a href='extension.html#property-lastError'>chrome.extension.lastError</a> will contain an error message.", |
mkearney
2012/06/14 15:12:28
onCreated event should link to the event.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "name": "getFileIcon", |
+ "parameters": [ |
+ { |
+ "description": "The identifier for the download.", |
+ "name": "downloadId", |
+ "type": "integer" |
+ }, |
+ { |
+ "name": "options", |
+ "optional": true, |
+ "properties": { |
+ "size": { |
+ "description": "The size of the icon. The returned icon will be square with dimensions size * size pixels. The default size for the icon is 32x32 pixels.", |
+ "enum": [ |
+ 16, |
+ 32 |
+ ], |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "name": "GetFileIconCallback", |
+ "parameters": [ |
+ { |
+ "name": "iconURL", |
+ "optional": true, |
+ "type": "string" |
+ } |
+ ], |
+ "type": "function" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Erase matching DownloadItems from history", |
+ "name": "erase", |
+ "nodoc": true, |
+ "parameters": [ |
+ { |
+ "$ref": "DownloadQuery", |
+ "name": "query" |
+ }, |
+ { |
+ "name": "EraseCallback", |
+ "optional": true, |
+ "parameters": [ |
+ { |
+ "items": { |
+ "type": "integer" |
+ }, |
+ "name": "erasedIds", |
+ "type": "array" |
+ } |
+ ], |
+ "type": "function" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "TODO(benjhayden) Comment.", |
mkearney
2012/06/14 15:12:28
Do you still need to add something here?
benjhayden
2012/06/14 16:44:13
This function is nodoc and not yet implemented. I'
|
+ "name": "setDestination", |
+ "nodoc": true, |
+ "parameters": [ |
+ { |
+ "name": "downloadId", |
+ "type": "integer" |
+ }, |
+ { |
+ "name": "relativePath", |
+ "type": "string" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Prompt the user to either accept or cancel a dangerous download. <code>acceptDanger()</code> does not automatically accept dangerous downloads.", |
+ "name": "acceptDanger", |
+ "nodoc": true, |
+ "parameters": [ |
+ { |
+ "name": "downloadId", |
+ "type": "integer" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Show the downloaded file in its folder in a file manager.", |
+ "name": "show", |
+ "nodoc": true, |
+ "parameters": [ |
+ { |
+ "name": "downloadId", |
+ "type": "integer" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Open the downloaded file.", |
+ "name": "open", |
+ "nodoc": true, |
+ "parameters": [ |
+ { |
+ "name": "downloadId", |
+ "type": "integer" |
+ } |
+ ], |
+ "type": "function" |
+ }, |
+ { |
+ "description": "Initiate dragging the file to another application.", |
+ "name": "drag", |
+ "nodoc": true, |
+ "parameters": [ |
+ { |
+ "name": "downloadId", |
+ "type": "integer" |
+ } |
+ ], |
+ "type": "function" |
+ } |
+ ], |
+ "namespace": "downloads", |
+ "nodoc": false, |
+ "types": [ |
+ { |
+ "id": "HeaderNameValuePair", |
+ "nodoc": true, |
+ "properties": { |
+ "name": { |
+ "description": "Name of the HTTP header.", |
+ "type": "string" |
+ }, |
+ "value": { |
+ "description": "Value of the HTTP header.", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "description": "", |
+ "enum": [ |
+ "GET", |
+ "POST" |
+ ], |
+ "id": "HttpMethod", |
+ "nodoc": true, |
+ "type": "string" |
+ }, |
+ { |
+ "id": "DownloadOptions", |
+ "nodoc": true, |
+ "properties": { |
+ "body": { |
+ "description": "post body", |
mkearney
2012/06/14 15:12:28
Capitalize post and add full-stop.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "filename": { |
+ "description": "A file path relative to the Downloads directory to contain the downloaded file.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "headers": { |
+ "description": "Extra HTTP headers to send with the request if the URL uses the HTTP[s] protocol. Each header is represented as a dictionary containing the keys <code>name</code> and either <code>value</code> or <code>binaryValue</code>, restricted to those allowed by XMLHttpRequest.", |
+ "items": { |
+ "properties": { |
+ "name": { |
+ "description": "Name of the HTTP header.", |
+ "type": "string" |
+ }, |
+ "value": { |
+ "description": "Value of the HTTP header.", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "optional": true, |
+ "type": "array" |
+ }, |
+ "method": { |
+ "description": "The HTTP method to use if the URL uses the HTTP[S] protocol.", |
+ "enum": [ |
+ "GET", |
+ "POST" |
+ ], |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "saveAs": { |
+ "description": "Use a file-chooser to allow the user to select a filename.", |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "url": { |
+ "description": "The URL to download.", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "description": "'file': The download's filename is suspicious. 'url': The download's URL is known to be malicious. 'content': The downloaded file is known to be malicious. 'uncommon': The download's URL is not commonly downloaded and could be dangerous. 'safe': The download presents no known danger to the user's computer. These string constants will never change, however the set of DangerTypes may change.", |
mkearney
2012/06/14 15:12:28
Can we format this in a list, rather than a paragr
benjhayden
2012/06/14 16:44:13
Done.
|
+ "enum": [ |
+ "file", |
+ "url", |
+ "content", |
+ "uncommon", |
+ "safe" |
+ ], |
+ "id": "DangerType", |
+ "type": "string" |
+ }, |
+ { |
+ "description": "'in_progress': the download is currently receiving data from the server. 'interrupted': an error broke the connection with the file host. 'complete': the download completed successfully. These string constants will never change, however the set of States may change.", |
mkearney
2012/06/14 15:12:28
Can we format this in a list, rather than a paragr
benjhayden
2012/06/14 16:44:13
Done.
|
+ "enum": [ |
+ "in_progress", |
+ "interrupted", |
+ "complete" |
+ ], |
+ "id": "State", |
+ "type": "string" |
+ }, |
+ { |
+ "id": "DownloadItem", |
+ "properties": { |
+ "bytesReceived": { |
+ "description": "Number of bytes received so far from the host, without considering file compression.", |
+ "name": "bytesReceived", |
+ "type": "integer" |
+ }, |
+ "danger": { |
+ "$ref": "DangerType", |
+ "description": "Indication of whether this download is thought to be safe or known to be suspicious.", |
+ "name": "danger" |
+ }, |
+ "dangerAccepted": { |
+ "description": "true if the user has accepted the download's danger.", |
mkearney
2012/06/14 15:12:28
Capitalize true.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "name": "dangerAccepted", |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "endTime": { |
+ "description": "Number of milliseconds between the unix epoch and when this download ended.", |
+ "name": "endTime", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "error": { |
+ "description": "Number indicating why a download was interrupted.", |
+ "name": "error", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "fileSize": { |
+ "description": "Number of bytes in the whole file post-decompression, or -1 if unknown.", |
+ "name": "fileSize", |
+ "type": "integer" |
+ }, |
+ "filename": { |
+ "description": "absolute local path", |
+ "name": "filename", |
+ "type": "string" |
+ }, |
+ "id": { |
+ "description": "An identifier that is persistent across browser sessions.", |
+ "name": "id", |
+ "type": "integer" |
+ }, |
+ "incognito": { |
+ "description": "False if this download is recorded in the history, true if it is not recorded.", |
+ "name": "incognito", |
+ "type": "boolean" |
+ }, |
+ "mime": { |
+ "description": "The file's MIME type.", |
+ "name": "mime", |
+ "type": "string" |
+ }, |
+ "paused": { |
+ "description": "true if the download has stopped reading data from the host, but kept the connection open.", |
mkearney
2012/06/14 15:12:28
Capitalize true.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "name": "paused", |
+ "type": "boolean" |
+ }, |
+ "startTime": { |
+ "description": "Number of milliseconds between the unix epoch and when this download began.", |
+ "name": "startTime", |
+ "type": "integer" |
+ }, |
+ "state": { |
+ "$ref": "State", |
+ "description": "Indicates whether the download is progressing, interrupted, or complete.", |
+ "name": "state" |
+ }, |
+ "totalBytes": { |
+ "description": "Number of bytes in the whole file, without considering file compression, or -1 if unknown.", |
+ "name": "totalBytes", |
+ "type": "integer" |
+ }, |
+ "url": { |
+ "description": "absolute URL", |
mkearney
2012/06/14 15:12:28
Capitalize absolute and add full-stop.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "name": "url", |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "id": "DownloadQuery", |
+ "nodoc": true, |
+ "properties": { |
+ "bytesReceived": { |
+ "description": "Number of bytes received so far from the host, without considering file compression.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "danger": { |
+ "$ref": "DangerType", |
+ "description": "Indication of whether this download is thought to be safe or known to be suspicious.", |
+ "optional": true |
+ }, |
+ "dangerAccepted": { |
+ "description": "true if the user has accepted the download's danger.", |
mkearney
2012/06/14 15:12:28
Capitalize true.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "endTime": { |
+ "description": "Number of milliseconds between the unix epoch and when this download ended.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "endedAfter": { |
+ "description": "Limits results to downloads that ended after the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "endedBefore": { |
+ "description": "Limits results to downloads that ended before the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "error": { |
+ "description": "Number indicating why a download was interrupted.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "fileSize": { |
+ "description": "Number of bytes in the whole file post-decompression, or -1 if unknown.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "filename": { |
+ "description": "absolute local path", |
mkearney
2012/06/14 15:12:28
Capitalize absolute and add full-stop.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "filenameRegex": { |
+ "description": "Limits results to downloads whose filename matches the given regular expression.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "id": { |
+ "description": "An identifier that is persistent across browser sessions.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "limit": { |
+ "description": "Setting this integer limits the number of results. Otherwise, all matching DownloadItems will be returned.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "mime": { |
+ "description": "The file's MIME type.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "orderBy": { |
+ "description": "Setting this string to a DownloadItem property sorts the DownloadItems prior to applying the above filters. For example, setting <code>orderBy='startTime'</code> sorts the DownloadItems by their start time in ascending order. To specify descending order, prefix <code>orderBy</code> with a hyphen: '-startTime'.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "paused": { |
+ "description": "true if the download has stopped reading data from the host, but kept the connection open.", |
mkearney
2012/06/14 15:12:28
Capitalize true.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "query": { |
+ "description": "This space-separated string of search terms that may be grouped using quotation marks limits results to downloads whose filename or url contain all of the search terms that do not begin with a dash '-' and none of the search terms that do begin with a dash.", |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "startTime": { |
+ "description": "Number of milliseconds between the unix epoch and when this download began.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "startedAfter": { |
+ "description": "Limits results to downloads that started after the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "startedBefore": { |
+ "description": "Limits results to downloads that started before the given ms since the epoch.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "state": { |
+ "$ref": "State", |
+ "description": "Indicates whether the download is progressing, interrupted, or complete.", |
+ "optional": true |
+ }, |
+ "totalBytes": { |
+ "description": "Number of bytes in the whole file, without considering file compression, or -1 if unknown.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "totalBytesGreater": { |
+ "description": "Limits results to downloads whose totalBytes is greater than the given integer.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "totalBytesLess": { |
+ "description": "Limits results to downloads whose totalBytes is less than the given integer.", |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "url": { |
+ "description": "absolute URL", |
mkearney
2012/06/14 15:12:28
Capitalize absolute.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "urlRegex": { |
+ "description": "Limits results to downloads whose url matches the given regular expression.", |
mkearney
2012/06/14 15:12:28
url should be URL.
benjhayden
2012/06/14 16:44:13
Done.
|
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "id": "DownloadStringDiff", |
+ "nodoc": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "id": "DownloadLongDiff", |
+ "nodoc": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "id": "DownloadBooleanDiff", |
+ "nodoc": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "boolean" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "id": "DownloadDelta", |
+ "nodoc": true, |
+ "properties": { |
+ "danger": { |
+ "description": "Describes a change in a DownloadItem's <code>danger</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "dangerAccepted": { |
+ "description": "Describes a change in a DownloadItem's <code>dangerAccepted</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "boolean" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "endTime": { |
+ "description": "Describes a change in a DownloadItem's <code>endTime</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "error": { |
+ "description": "Describes a change in a DownloadItem's <code>error</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "fileSize": { |
+ "description": "Describes a change in a DownloadItem's <code>fileSize</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "filename": { |
+ "description": "Describes a change in a DownloadItem's <code>filename</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "id": { |
+ "description": "An identifier that is persistent across browser sessions.", |
+ "type": "integer" |
+ }, |
+ "mime": { |
+ "description": "Describes a change in a DownloadItem's <code>mime</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "paused": { |
+ "description": "Describes a change in a DownloadItem's <code>paused</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "boolean" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "boolean" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "startTime": { |
+ "description": "Describes a change in a DownloadItem's <code>startTime</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "state": { |
+ "description": "Describes a change in a DownloadItem's <code>state</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "totalBytes": { |
+ "description": "Describes a change in a DownloadItem's <code>totalBytes</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "integer" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ "url": { |
+ "description": "Describes a change in a DownloadItem's <code>url</code>.", |
+ "optional": true, |
+ "properties": { |
+ "current": { |
+ "optional": true, |
+ "type": "string" |
+ }, |
+ "previous": { |
+ "optional": true, |
+ "type": "string" |
+ } |
+ }, |
+ "type": "object" |
+ } |
+ }, |
+ "type": "object" |
+ }, |
+ { |
+ "id": "GetFileIconOptions", |
+ "nodoc": true, |
+ "properties": { |
+ "size": { |
+ "description": "The size of the icon. The returned icon will be square with dimensions size * size pixels. The default size for the icon is 32x32 pixels.", |
+ "enum": [ |
+ 16, |
+ 32 |
+ ], |
+ "optional": true, |
+ "type": "integer" |
+ } |
+ }, |
+ "type": "object" |
+ } |
+ ] |
+ } |
+] |