CHJani / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

Redesign how we generate properties for global parameters #305

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently we have key, prettyPrint, and userIp at the ApiClient level, and 
fields at the per-request basis.  There are several problems/limitations to 
this approach:

1. We are hand-crafting this list rather than truly generating it from 
Discovery's global parameter list.  If a new parameter is added, we won't get 
it.  Similarly, if a parameter is not applicable to an API, we won't suppress 
generating it.

2. We have to make a decision for each parameter whether it needs to be 
per-request or at the ApiClient level.  There may be use cases like userIp 
where there are different use cases for being at one level or the other.

I propose instead to generate all global parameters directly from Discovery to 
the per-request level, and have none of these parameters at the ApiClient 
level.  But then I also want some kind of RemoteRequestInitializer interface 
that works just like HttpRequestInitializer that allows any parameter in 
RemoteRequest to be initialized the same across all RemoteRequests.

Original issue reported on code.google.com by rmis...@google.com on 27 Sep 2011 at 3:48

GoogleCodeExporter commented 9 years ago
This issue was reported internally by yanivi@google.com

Original comment by rmis...@google.com on 27 Sep 2011 at 5:43

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 6 Oct 2011 at 4:17

GoogleCodeExporter commented 9 years ago
Fixed as part of 
http://code.google.com/p/google-api-java-client/issues/detail?id=345

Fixed in changesets:
http://codereview.appspot.com/5271052/
http://codereview.appspot.com/5225041/

Original comment by rmis...@google.com on 4 Nov 2011 at 4:03

GoogleCodeExporter commented 9 years ago

Original comment by yan...@google.com on 7 Nov 2011 at 5:36