shigetomi1229 / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

ContentForShopping ProductQuery NumberToRetrieve has no effect on the number of returned items #505

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create new ProductQuery
2. Set NumberToRetrieve property of the query to 50
3. Call service.Query(query) to retrieve product feed

What is the expected output? What do you see instead?
Expected is that number of product entries returned is 50 (of course if there 
are more than 50 products)
What I see instead is that only 25 product entries are returned even if I have 
a total of 80 products.

What version of the product are you using? On what operating system?
1.8, win 7

Please provide any additional information below.

Original issue reported on code.google.com by thomas.k...@gmail.com on 19 May 2011 at 2:34

GoogleCodeExporter commented 8 years ago
The Content for Shopping API uses the max-results field to limit the number of 
returned entries:

http://code.google.com/apis/shopping/content/getting-started/usingapi-products.h
tml#Retrieving

Have you tried using it instead of the NumberToRetrieve property of the base 
query object?

Original comment by ccherub...@google.com on 25 May 2011 at 11:13

GoogleCodeExporter commented 8 years ago
Yes, but that doesn't change the fact that NumberToRetrieve is not working.
I think it would be logical that if NumberToRetrieve is set by the user, then 
parameter max-results with the value of NumberToRetrieve is added to the URL 
(when the URL is built). Or am I wrong?

Original comment by thomas.k...@gmail.com on 25 May 2011 at 11:53

GoogleCodeExporter commented 8 years ago
I had exactly the same idea of mapping NumberToRetrieve to max-results when 
used in a ProductQuery.
I'll add it to my to-do list, thanks!

Original comment by ccherub...@google.com on 25 May 2011 at 12:43

GoogleCodeExporter commented 8 years ago

Original comment by ccherub...@google.com on 25 May 2011 at 1:51

GoogleCodeExporter commented 8 years ago
The CalculateQUery method in ItemQuery was ignoring the max-results parameter, 
this is now fixed in rev. 1105.

Original comment by ccherub...@google.com on 10 Jun 2011 at 11:12