Reputation: 98
Google Drive API v3 documentation:
Full resources are no longer returned by default. Use the fields query parameter to request specific fields to be returned. If left unspecified only a subset of commonly used fields are returned.
Either there is a fields
request (query) parameter in the googleapis Dart library (which I can't find) or the library is useless for Google Drive API v3. Or maybe a workaround?
Upvotes: 1
Views: 201
Reputation: 4013
I believe it means that some HTTP requests (in the underlying web api) require a additional ?fields='...'
parameter to know what fields to include in the response. That documentation page helpfully gives a list of fields but does not say which requests require the parameter.
I personally find neither the Google api pages nor the Dart Google API libraries documentation to be very helpful, however, the Google OAuth Playground allows all the apis to be executed and tested. I used this tool to figure out what inputs are required for each web request and to make sure my Dart code was getting expected results.
Edit:
Every request in the api MAY include a ?fields='...'
parameter, but don't have to.
If left unspecified only a subset of commonly used fields are returned.
So depending on what you are doing you may not need to specify it.
Upvotes: 1
Reputation: 657781
Looks like the fields need to be added to the URL
https://developers.google.com/drive/v3/web/performance#partial
https://www.googleapis.com/demo/v1?key=YOUR-API-KEY&fields=kind,items(title,characteristics/length)
Upvotes: 1