5 messages in com.googlegroups.google-base-data-apiRe: Query help - filtering a feed alp...| Subject: | Re: Query help - filtering a feed alphabetically![]() |
|---|---|
| From: | jack (j....@floridata.com) |
| Date: | 12/06/2007 03:42:07 PM |
| List: | com.googlegroups.google-base-data-api |
Hi Jeff,
Thanks for the info - I hope they do come up with an alpha lookup at some point for GBase - I'm sure I wouldn't be the only one to make use of it!
The happy news for me is that Yahoo Pipes DOES pass through GBase custom elements if JSON output is used rather than RSS/ATOM...
Then I found _IG_FetchFeedAsJSON() in the API and am using that with Pipes which works fine. The sad news is that when I try to access these custom elements JavaScript complains about "Invalid Labels" when it sees something like "g:image_link" or "c:family"...
Is there a way to deal with this in Javascript or should I look for a solution in Pipes or upstream that suppresses the namespace prefix in the Pipes input feed?
Below is JSON output from Pipes (a fragment - single entry) when "openned" (I wonder why the / character is escaped?)
{"c:family":"Leguminosae\/Fabaceae","link":"http:\/\/www.floridata.com \/plant1\/plantbynumber.cfm?fdid=681&menu=1","c:high_zone":"9","y:id": {"value":null,"permalink":"true"},"c:low_zone":"5","g:image_link":"http: \/\/www.floridata.com\/ref\/b\/images\/ bapt_al1.jpg","description":"White wild indigo is a herbaceous perennial that looks more like a shrub than a typical perennial. It grows into a nice round bushy shape up to 4 ft (1.2 m) high and nearly as wide. Even in warmer areas this plant goes dormant in the winter and should be carefully marked so it is not disturbed during dormancy. In early spring unique bare stalks, looking similar to asparagus shoots, appear, then start leafing out. A month later it produces several 12 to 18 in (30.5-45.7 cm) upright white flower spikes above the foliage. The leaves are trifoliolate, meaning there are sets of three leaflets on each stem. The stem and foliage color is blue- green.","c:common_names":"white wild indigo, white false indigo","c:features":"flowers, drought tolerant","y:title":"Baptisia alba","c:fdid":"681","title":"Baptisia alba","pubDate":null,"c:plant_type":"perennial","y:published":null}
...thanks for any and all suggestions jack
On Dec 5, 4:22 pm, Jeff S <j....@google.com> wrote:
Hi jack,
This might actually prove a bit difficult using the API. I don't think there is currently a way to sort alphabetically or give string based ranges. We only support operations like < and > for dates and numbers. You'll need to use your own logic to do the alphabetical filtering for the time being, and there are a few options. What kind of application were you building (desktop, scripted web page, Ajax web page)? Yahoo Pipes is a good resource but it's interesting to hear that they don't preserve custom elements, I think they might like to know about this. You might also want to enter a request for alphabetical queries on our issue tracker.
http://code.google.com/p/gdata-issues/issues/list
Thank you,
Jeff
On Dec 4, 10:33 am, jack <j....@floridata.com> wrote:
other than use a service like Yahoo pipes I have been totally unable to figure out how to query Google Base in such a way as to filter the feed alphabetically by first letter of Entry Title element. All I want to do is to select all of the Entries who's Title values begin with "A" (or "B") etc.
There must be a way to do that - right? I've spent a lot of time with the documentation and just haven't figured it out (and I want to avoid using Pipes which has a lovely, intuitive way of letting me use a Regular Expression to do the job - the problem with Pipes tho is that it doesn't pass-through my custom gBase attributes when it writes out RSS/ATOM although it writes out JSON OK...)
Please help - I have that feeling that I missed something obvious...- Hide
quoted text -
- Show quoted text -




