abujehad139 / google-api-go-client

Automatically exported from code.google.com/p/google-api-go-client
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add field selectors #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
`fields` query param allows API backend to trim down the returning entity, 
valuable for working with resources with large number of attributes. Also note 
that some APIs ignore unnecessary calls that may improve performance.

func (c *XCall) Fields(fields string) *XCall {
    c.opt_["fields"] = fields
    return c
}

Sample for drive.files.list with `items/id,nextPageToken`:
GET https://www.googleapis.com/drive/v2/files?fields=items%2Fid%2CnextPageToken

Original issue reported on code.google.com by j...@google.com on 9 Aug 2013 at 10:53