]> gitweb.factorcode.org Git - factor.git/blob - libs/google-search/google-search.facts
more sql changes
[factor.git] / libs / google-search / google-search.facts
1 ! Copyright (C) 2006 Chris Double\r
2 ! See http://factorcode.org/license.txt for BSD license.\r
3 USING: help google-search ;\r
4 \r
5 HELP: build-soap-request\r
6 { $values { "key" "the Google Web API key" } { "string" "the Google search string" } { "soap" "the SOAP body for the request" } }\r
7 { $description \r
8   "Return a string containing the SOAP request to performthe results of a google search from the Google Web API."\r
9   "The given key must be the authentication key obtained from Google to use the API." } \r
10 { $see-also google-search } ;\r
11 \r
12 HELP: google-search\r
13 { $values { "key" "the Google Web API key" } { "string" "the Google search string" } { "result" "a sequence of search results" } }\r
14 { $description "Request the results of a google search from the Google Web API. The given key must be the authentication key obtained from Google to use the API. The search results are returned as a sequence of " { $link search-item } " objects." } \r
15 { $see-also search-item-url search-item-snippet search-item-title } ;\r
16 \r
17 HELP: search-item-url\r
18 { $values { "item" "a search item" } { "url" "a string" } }\r
19 { $description "Return the URL of the given search item." } \r
20 { $see-also google-search search-item-snippet search-item-title } ;\r
21 \r
22 HELP: search-item-snippet\r
23 { $values { "item" "a search item" } { "snippet" "a string" } }\r
24 { $description "Return the snippet of the given search item." } \r
25 { $see-also google-search search-item-url search-item-title } ;\r
26 \r
27 HELP: search-item-title\r
28 { $values { "item" "a search item" } { "title" "a string" } }\r
29 { $description "Return the title of the given search item." } \r
30 { $see-also google-search search-item-snippet search-item-url } ;\r
31 \r
32 ARTICLE: { "google-search" "overview" } "Google Search"\r
33 "The google-search library is used for querying the Google search engine using their "\r
34 "SOAP based API. It requires a special key that used to be obtained from Google to use "\r
35 "the service."\r
36 $terpri\r
37 "Unfortunately as of December 2006 the service has been deprecated and keys "\r
38 "are no longer available. The service continues to be usable if you have (or can find) "\r
39 "an existing key. I'll update this library when an alternative service becomes available."\r
40 $terpri\r
41 "An example of usage is:"\r
42 { $code "\"mygooglekey\" \"factor programming language\" google-search" }\r
43 "This returns a sequence of " { $link search-item } " objects. The following methods on this object can be used to get the results of the search:"\r
44 { $subsection search-item-url }\r
45 { $subsection search-item-title }\r
46 { $subsection search-item-snippet }\r
47 "For example:"\r
48 { $code "\"mygooglekey\" \"factor programming language\" google-search [ search-item-title ] map" } ;