Both Google Drive API and Google Spreadsheet API (v 3.0) support methods for getting the [KEY] corresponding to the following URL:
https://docs.google.com/spreadsheet/ccc?key=[KEY]
I am using the File.getId() method for the Google Drive API, and the SpreadsheetEntry.getId or .getKey() methods for Google Spreadsheet API.
Google Drive API...
for (File file : mResult) {
System.out.println(file.getTitle());
System.out.println(file.getId());
}
Google SpreaSheet API...
SpreadsheetEntry spreadsheet = spreadsheets.get(0);
System.out.println(spreadsheet.getKey());
My trouble is that I cannot find any common key between the Drive and Spreadsheet APIs, yet both keys link to the same resource....they both retrieve the same spreadsheet when used to replace the [KEY] field in a browser.
I am trying to identify the spreadsheets that exist in a specific folder in Google Drive, and then use the Spreadsheet API to work with only those files. The SpreadSheet API seems to only be able to return all the files on a Google drive -- i see no way to limit results by folders. Hence why I must combine the two APIs.
Any thoughts?