Reputation: 1470
Within the OAuth 2.0 Playground, I can make this request, and it is valid:
https://www.googleapis.com/drive/v2/files?fields=items(id,exportLinks)
However, what I want to capture is just one of the export links: "text/plain". But if I request that specific field:
https://www.googleapis.com/drive/v2/files?fields=items(exportLinks/text/plain)
I get the following error:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "invalidParameter",
"message": "Invalid field selection plain",
"locationType": "parameter",
"location": "fields"
}
],
"code": 400,
"message": "Invalid field selection plain"
}
}
How do I specify that a partial should include "exportLinks" / "text/plain"
Upvotes: 0
Views: 325
Reputation: 22306
You can't request a specific exportLink type. You need to request them all "items(exportLinks)" and then look for the "text/plain" property of the returned exportLinks object ("var url = exportLinks['text/plain']")
Upvotes: 1