Closed GoogleCodeExporter closed 9 years ago
This is also an issue with the Google Mirror API:
https://www.googleapis.com/discovery/v1/apis/mirror/v1/rest
The affected methods are:
* mirror.timeline.attachments.get
* mirror.timeline.attachments.list
* mirror.timeline.attachments.insert
* mirror.timeline.attachments.delete
Thanks!
Alain
Original comment by ala...@google.com
on 16 Apr 2013 at 5:55
I attached a patch for a simple implementation supporting nested resource; it's
not optimal but does the job:
type TimelineAttachmentsService struct {
s *Service
}
I would rather have this Service be an attribute in the TimelineService so that
invocation would look like:
t, err := g.Timeline.Attachments.Get(itemId, attachmentId).Do()
Instead of the proposed implementation that looks like:
t, err := g.TimelineAttachments.Get(itemId, attachmentId).Do()
Unfortunately, doing the optimal implementation would require a refactoring of
the generator which I can't do right now.
Please let me know what you think and if you'd like me to upload this patch on
codereview.appspot.com
Thanks!
Alain
Original comment by ala...@google.com
on 19 Apr 2013 at 12:16
Attachments:
New patch of some bug fixes, this new generator now generates the "optimal"
design:
t, err := g.Timeline.Attachments.Get(itemId, attachmentId).Do()
It also fixes a bug when a method supports mediaUpload without a requestBody.
Patches:
* gen.diff: only contains diff for the new generator.
* nested_resources.diff: contains diff for the new generator and re-generated dependencies.
Original comment by ala...@google.com
on 19 Apr 2013 at 8:25
Attachments:
Submitted. Thanks again!
https://code.google.com/p/google-api-go-client/source/detail?r=14c8effb3ed7
Original comment by bradfitz@google.com
on 29 Apr 2013 at 5:06
Original issue reported on code.google.com by
ala...@google.com
on 11 Apr 2013 at 11:50