When a user selects one or more files, the Google Picker API returns a JSON-formatted object in the callback. Depending on the view from which the selection was made, different fields are present in this data object.
{ Response.ACTION: action, Response.VIEW: [ view_id, undefined, view_options { query: user_query, parent: parent_ID, ... } ], Response.DOCUMENTS: [ { Document.ADDRESS_LINES: [ address_line, ... ], Document.AUDIENCE: audience, Document.DESCRIPTION: description, Document.DURATION: duration, Document.EMBEDDABLE_URL: embed_URL, Document.ICON_URL: icon_URL, Document.ID: item_id, Document.IS_NEW: is_new, Document.LAST_EDITED_UTC: timestamp, Document.LATITUDE: latitude_value, Document.LONGITUDE: longitude_value, Document.MIME_TYPE: MIME_type, Document.NAME: item_name, Document.PARENT_ID: parent_ID, Document.PHONE_NUMBERS: { type: phone_type, number: phone_number, } ... ], Document.SERVICE_ID: service_id, Document.THUMBNAILS: [ { Thumbnail.URL: thumbnail_URL, Thumbnail.WIDTH: thumbnail_width, Thumbnail.HEIGHT: thumbnail_height } ... ], Document.TYPE: type, Document.URL: item_URL }, ... ] Response.PARENTS: [ { Document.AUDIENCE: audience, Document.DESCRIPTION: description, Document.LAST_EDITED_UTC: timestamp, Document.MIME_TYPE: MIME_type, Document.NAME: item_name, Document.ICON_URL: icon_URL, Document.ID: item_ID, Document.IS_NEW: is_new, Document.SERVICE_ID: service_id, Document.THUMBNAILS: [ { Thumbnail.URL: thumbnail_URL, Thumbnail.WIDTH: thumbnail_width, Thumbnail.HEIGHT: thumbnail_height } ... ], Document.TYPE: type, Document.URL: item_URL, }, ... } } | |
action | The Action taken by the user to close the picker dialog. |
address_line | The address of a picked location. |
audience | The Audience of a Picasa Web Albums photo album. |
description | A description of the item, if provided. |
duration | The duration of the selected video. |
embed_URL | A URL for an embeddable version of the item. |
icon_URL | A URL for a publicly accessible version for an icon, if available. |
is_new | True if the selected item was uploaded then immediately selected. |
item_URL | A URL linking directly to the item. |
item_id | ID of the selected item. |
item_name | Name of the selected item. |
latitude_value | Latitude of a selected location (or of where the photo was taken if it has geo data), in degrees. |
longitude_value | Longitude of a selected location (or of where the photo was taken if it has geo data), in degrees. |
MIME_type | The MIME type of the selected item (not valid for maps). |
parent_ID | ID of parent item, if applicable. |
phone_number | The phone number of a selected location. |
phone_type | The type of phone number for a selected location. |
service_id | A ServiceId that describes the service this file was picked from. |
thumbnail_height | The height of the publicly accessible thumbnail. |
thumbnail_URL | A URL for the publicly accessible thumbnail. |
thumbnail_width | The width of the publicly accessible thumbnail. |
timestamp | The number of milliseconds since January 1, 1970, 00:00:00 GMT. |
type | The Type of the selected item. |
user_query | Query string, if one was set in View.setQuery(). |
view_ID | The ViewId of the View the item was selected from. |
view_options | Additional information, if known. Otherwise undefined. |