Personally, I prefer using official APIs whenever reasonable. They're 
supported, don't change, and require less network traffic. That said, 
sometimes there is no API, or the API just sucks.

- Blair




On 23/02/2009 6:25 AM, Christian Sonne wrote:
> On Sun, Feb 22, 2009 at 4:31 AM, Abimanyu Raja <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Wonderful! Now, can we get previews for the all built-in commands
>     like Yahoo!, ask, etc?
>
>
> Also, there's the question if we prefer using the APIs as we currently
> do, or just search via the site (as the parser for makeSearchCommand
> sortof assumes)
>
> Here is a list of the ones I've (re)made so far:
> (ohh and btw, with recently checked in code, icon and description is
> generated automatically if possible (and needed))
>
> CmdUtils.makeSearchCommand({
> name: "Google",
> url: "http://www.google.com/search?q={QUERY}";,
> parser: {container: "div ol", title: "h3.r", preview: "div.s"}
> });
>
> CmdUtils.makeSearchCommand({
> name: "Wikipedia",
> url:
> "http://en.wikipedia.org/wiki/Special:Search?search={QUERY}&fulltext=Search
> <http://en.wikipedia.org/wiki/Special:Search?search={QUERY}&fulltext=Search>",
> parser: {container: "ul.mw-search-results",
> title: "li a",
> preview: "div.searchresult",
> baseurl: "http://en.wikipedia.org"}
> });
>
> CmdUtils.makeSearchCommand({
> name: "IMDb",
> url: "http://www.imdb.com/find?s=all&q={QUERY}
> <http://www.imdb.com/find?s=all&q={QUERY}>",
> parser: {container: "table#outerbody table table",
> title: "td>a",
> baseurl: "http://www.imdb.com"}
> });
>
> CmdUtils.makeSearchCommand({
> name: "Yahoo",
> url: "http://search.yahoo.com/search?p={QUERY}";,
> parser: {container: "div#web",
> title: "div h3",
> preview: "div.abstr"}
> });
>
> CmdUtils.makeSearchCommand({
> name: "Amazon",
> url:
> "http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Dstripbooks&field-keywords={QUERY}
> <http://www.amazon.com/s/ref=nb_ss_gw?url=search-alias%3Dstripbooks&field-keywords={QUERY}>"
> parser: {container: "div.listView",
> title: "div.productTitle a",
> preview: "div.productTitle span.ptBrand"}
> });
>
> Improvements and additions to the list are welcome :-)
>
> Some are definitely not yet as pretty as the originals - so I don't
> think we should switch over indiscriminately...
>
> -- cers / Christian Sonne
>
>
>     - Abi
>
>
> >

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" 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/ubiquity-firefox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to