firatisler / google-api-dotnet-client

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

Generate a request class #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For reference, take a look at the generated surface for Google Buzz in Java:

https://javadoc.google-api-java-client.googlecode.com/hg/apis/buzz/com/google/ap
i/services/buzz/v1/Buzz.html

An important design requirement is that there is a class for each discovery 
request.  So instead of a method like:

    ActivityFeed feed = buzz.activities.list("112550920411899420633", "@public");

The typical use is like this:

    ActivityFeed feed = buzz.activities.list("112550920411899420633", "@public").execute();

Note that the parameters to the list method are only the required parameters.  
If one wants to specify an optional parameter like the fields mask for a 
partial response request, one needs to use the request object directly:

Buzz.Activities.List request = buzz.activities.list("112550920411899420633", 
"@public");
request.fields = "items/object/content";
ActivityFeed feed = request.execute();

This is a very important pattern of making requests that we need to use in the 
.NET library as well.

Original issue reported on code.google.com by yan...@google.com on 1 Jun 2011 at 2:25

GoogleCodeExporter commented 9 years ago

Original comment by mlin...@google.com on 14 Jul 2011 at 4:04