Thx Alex. I was hoping there was a way to overcome the limit - but I guess I will have to track the gids at mny end.
On Jun 10, 9:49 am, Alex <[email protected]> wrote: > Check the notes provided for the start-index attribute in the > documentation:http://code.google.com/apis/base/docs/2.0/reference.html#StandardQuer... > The /items feed returns a maximum of 10k items. > There are two ways that I can think of for updating your items: > (1) when inserting an item, Base returns an item ID (<atom:id> or <id>). You > will store this > Base ID attached to the item and then you just update the item when needed > (HTTP PUT tohttp://www.google.com/base/feeds/items/<the_item_id>) > (2) you should provide a <g:id> as part of every item (your sku). This g:id > has to be unique across your items. Later on, when you insert (HTTP POST > tohttp://www.google.com/base/feeds/items) an item with the same g:id, this > item will override the old one (because you have the same id, therefore must > be the same item). You can use this mechanism for updating the entries that > changed on your side regularly. > > In both approaches, you should track on your side if you have modified an > item after the last update to Google Base, and regularly go through these > "dirty" items and update them (using one of the approaches I've described > above). > > Hope it helps, > Alex > > On Wed, Jun 10, 2009 at 9:56 AM, [email protected] < > > > > [email protected]> wrote: > > > Hi - I am trying to get a *complete* list of our items (specificall > > the gbase item IDs) so that we can update current items and insert new > > items as appropriate. > > > The Gbase Performance Overview (graph) shows we have 16.96K Active > > Items. The text below the graph shows we have 12,165 items. > > > But we are only able to retrieve 9522 items (using PHP Zend Gdata > > Library). > > > Any idea what could be the problem? > > > More detail (if required): > > > [1] Items are being submitted via api-batch insert. > > > [2] Sample Insert XML is here: > >http://docs.google.com/View?id=dd7qktf3_705fpqfqg2 > > > [3] Sample Return XML is here: > >http://docs.google.com/View?id=dd7qktf3_71dbqr6g2v > > > [4] The inserts seem ok. The message says 'Created' (<batch:status > > code='201' reason='Created'/>). I can see the items on Gbase. > > > [5] The issue is trying to retrieve *all* of them. I cant. I can > > retrieve the bulk of them in a batch process (9522 of them). The rest > > I can only retrieve individually. > > > Am using the following Zend Code to retrieve in batches of 100. > > > $limit = 100; > > $offset = 0; > > > $service = new Zend_Gdata_Gbase($client); > > $query = $service->newItemQuery(); > > $query->setCategory('Products'); > > $query->setMaxResults($limit); > > $query->setStartIndex($offset + 1); > > $feed = $service->getGbaseItemFeed($query); > > > .. and then repeating this until no more data. It consistently > > gets me 9522 items, and not the 16K that I am expecting. > > > [6] URL:www.redstore.com, Gbase Email: redstoreUK [at] gmail.com, > > Gbase Account ID: 360868 > > > Thx. > > -- > Alex Dovlecel, Google Switzerland GmbH > Company Identifikationsnummer: CH-020.4.028.116-1 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Base Data API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Base-data-API?hl=en -~----------~----~----~----~------~----~------~--~---
