sdrose65 / google-gdata

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

Setting Productquery Uri produces incorrect Url #517

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
feed.NextChunk = 
"https://content.googleapis.com/content/v1/xxxxxxx/items/products/schema?start-t
oken=8a99581268088c234d45ce1a0d5fd6e40c034416009a47ff2c2223f917b199ab&max-result
s=25"

Calling query.Uri = new Uri(feed.NextChunk) causes the uri to be set to 
{https://content.googleapis.com/content/v1/xxxxxxx/items/products/schemaxxxxxxx/
items/products/schema}

Here is my code.  It's pretty simple.

ContentForShoppingService service = ReturnService();
        query = new ProductQuery("schema", "xxxxxxx");
        feed = service.Query(query);
        col = new System.Collections.Generic.List<ProductEntry>();

        while (true)
        {
            foreach (ProductEntry e in feed.Entries)
                col.Add(e); //i have a collection i put all the entries into

            if (feed.NextChunk == null)
                break;
            else
            {
                query.Uri = new Uri(feed.NextChunk);
                feed = service.Query(query);
            }
        }

I see that a later build has the NumberToRetrieve mapping to max-results, but I 
want to see this code work.  Any ideas why the URL is getting screwed up?

John

Original issue reported on code.google.com by adwords...@johnwest.com on 20 Jun 2011 at 3:19

GoogleCodeExporter commented 9 years ago
You seem to have found a bug on the way the library builds the ProductQuery 
Uri, I'm going to have it fixed as soon as possible.

Original comment by ccherub...@google.com on 21 Jun 2011 at 3:57

GoogleCodeExporter commented 9 years ago
Fixed in rev. 1106

Original comment by ccherub...@google.com on 22 Jun 2011 at 12:28