aquarat / 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

drive/v2: FileExportLinks is an empty struct #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In the Drive API, FileExportLinks doesn't get populated with exportLinks 
because it's an empty struct[1]. Changing it to a "map[string]string", and 
changing File.ExportLinks from "*FileExportLinks" to "FileExportLinks" allows 
it to be populated properly.

[1] 
http://code.google.com/p/google-api-go-client/source/browse/drive/v2/drive-gen.g
o?spec=svnf2d5f0fc941a1e1ae50b1cd65371d1fb474f9cbb&r=677f7744ee455af05a37828bd26
575b3025a8364#532

Original issue reported on code.google.com by img...@gmail.com on 18 Oct 2012 at 8:46

GoogleCodeExporter commented 9 years ago
How would one go about modifying this on their local install while we wait for 
the API to be fixed/updated?

Original comment by prat...@condorcapital.com on 23 Jan 2013 at 9:34

GoogleCodeExporter commented 9 years ago
Patch attached.

Original comment by img...@gmail.com on 24 Jan 2013 at 8:09

Attachments:

GoogleCodeExporter commented 9 years ago
Figured out how to modify locally:

Modify your local cache of the drive-gen.go file (mine was located here: 
/usr/lib/go/src/pkg/code.google.com/p/google-api-go-client/drive/v2/drive-gen.go
). You can use the provided patch above or just manually change the lines.

Then perform a "go install code.google.com/p/google-api-go-client/drive/v2" to 
build and install the modified version of the file.

Original comment by prat...@condorcapital.com on 24 Jan 2013 at 9:09

GoogleCodeExporter commented 9 years ago
It appears that for Google Analytics, the GaData.totalsForAllResults field is 
the same type: its auto-generated as an empty struct, but should be a 
map[string]string.

Original comment by e...@evanjones.ca on 21 Jun 2013 at 4:04

GoogleCodeExporter commented 9 years ago
The BigQuery V2 also has an empty struct generated (JsonObject), instead of a 
map[string]interface.

Original comment by ronoaldo on 27 May 2014 at 2:01