$Id: CHANGES,v 1.6 2003/01/18 00:55:25 ianmacd Exp $ New in version 0.5.0 -------------------- No user-visible changes. SOAP4R 1.4.8 now has a WSDL driver, so we can use Google's WSDL file directly instead of having to define the underlying methods ourselves. This just makes the code simpler and briefer. New in version 0.4.2 -------------------- Google::Search now deprecates use of the 'oe' and 'ie' parameters, in line with changes made by Google to the Web API on 30th August 2002. If Ruby is run in verbose mode and either of these parameters is used, a warning will be issued. New in version 0.4.1 -------------------- No user-visible changes. There are some very minor code changes since 0.4.0 and some bugs in the RD documentation were fixed. A Makefile is now included to aid installation. No bugs have been reported against 0.4.0, so 0.4.1 may turn into 1.0.0 at some point in the near future. New in version 0.4.0 -------------------- This version of the software introduces slight incompatibilities with previous releases: - The directoryCategories member of the Struct::Response returned by Search.new is now of type Struct::DirectoryCategory. A Struct::DirectoryCategory contains two attributes, fullViewableName and specialEncoding. - For consistency with the above change, the directoryName member of the Struct::ResultElement returned by ResultElement.new was renamed fullViewableName. The directoryEncoding member of the Struct::ResultElement was renamed specialEncoding. The following new features have been added: - A new class method, Search.query_length_ok?, was added. This takes a String parameter and returns either true or false, depending on whether or not the query string is within the limits specified by the Google Web API. - A new class method, Search.query_words_ok?, was added. This takes a String parameter and returns either true or false, depending on whether or not the number of words in the query string is within the limits specified by the Google Web API. - A new class method, Search.query_sites_ok?, was added. This takes a String parameter and returns either true or false, depending on whether or not the number of 'site:' restict clauses in the query string is within the limits specified by the Google Web API. - A new class method, Search.query_ok?, was added. This encapsulating method takes a String parameter and returns either true or false, depending on whether or not the query string passes all of the tests imposed by the Search.query_length_ok?, Search.query_words_ok? and Search.query_sites_ok? methods. - A new class method, Search.restrict, was added. This takes two parameters, type and *data, and assembles a query term consisting of a restrict type and its parameters. If type is phrase, a double-quoted copy of each string passed as *data is returned. If type is daterange, the first three parameters of *data must be the year, month, and day of a start date. The next three parameters, if given, form the year, month, and day of an end date. If these last three parameters are not given, today's date will be substituted. Other supported restrict types are site, intitle, allintitle, inurl, allinurl, allintext, allinlinks, filetype, notfiletype, info, link, related, cache, include and exclude. Some of these names differ slightly from those given in section 2.2 of APIs_Reference.html in order to simplify their use and memorability. When the restrict type is neither phrase nor daterange, it's possible to assemble multiple restrict terms of the same type in a single call to Search#restrict, by simply extending the parameter list when you invoke the method. New in version 0.3.0 -------------------- This version of the software introduces incompatibilities with previous releases. The Search#search method now returns a Struct::Response instead of a Google::Search object. Previously, the instance variable @response contained the Struct::Response. The resultElements member of the Struct::Response returned by Search#search contains Struct::ResultElement objects. These no longer contain the instance variable @attribute. This means that, whereas you would previously have written code like: i = 0 q = google.search(query) q.response['resultElements'].each do |result| printf "\nResult # %d\n\n", i += 1 result.each do |key| printf("%s = %s\n", key, result.attribute[key]) end end puts '---------------------------------' printf "Estimated number of results is %d.\n", q.response['estimatedTotalResultsCount'] printf "Your query took %6f seconds.\n", q.response['searchTime'] you would now write: i = 0 q = google.search(query) q.resultElements.each do |result| printf "\nResult # %d\n\n", i += 1 result.each do |key| printf("%s = %s\n", key, result.send(key)) end end puts '---------------------------------' printf "Estimated number of results is %d.\n", q.estimatedTotalResultsCount printf "Your query took %6f seconds.\n", q.searchTime