Fixed loads of bugs. It now works. Ready to integrate in assessortool.
[perl4caml.git] / wrappers / pl_Net_Google_Response.ml
1 (* Wrapper around Perl Net::Google::Reponse class.
2  * Copyright (C) 2003 Merjis Ltd.
3  * $Id: pl_Net_Google_Response.ml,v 1.1 2003-10-14 16:05:22 rich Exp $
4  *)
5
6 open Perl
7
8 class net_google_response sv =
9
10 object (self)
11
12   method documentFiltering =
13     bool_of_sv (call_method sv "documentFiltering" [])
14   method searchComments =
15     string_of_sv (call_method sv "searchComments" [])
16   method estimateTotalResultsNumber =
17     int_of_sv (call_method sv "estimateTotalResultsNumber" [])
18   method estimateIsExact =
19     bool_of_sv (call_method sv "estimateIsExact" [])
20   method searchQuery =
21     string_of_sv (call_method sv "searchQuery" [])
22   method startIndex =
23     int_of_sv (call_method sv "startIndex" [])
24   method endIndex =
25     int_of_sv (call_method sv "endIndex" [])
26   method searchTips =
27     string_of_sv (call_method sv "searchTips" [])
28   method directoryCategories =
29     let sv = call_method sv "directoryCategories" [] in
30     let av = deref_array sv in
31     av_map (fun sv -> new net_google_response sv) av
32   method searchTime =
33     float_of_sv (call_method sv "searchTime" [])
34   method toString =
35     string_of_sv (call_method sv "toString" [])
36   method title =
37     string_of_sv (call_method sv "title" [])
38   method url =
39     string_of_sv (call_method sv "URL" [])
40   method snippet =
41     string_of_sv (call_method sv "snippet" [])
42   method cachedSize =
43     string_of_sv (call_method sv "cachedSize" [])
44   method directoryTitle =
45     string_of_sv (call_method sv "directoryTitle" [])
46   method summary =
47     string_of_sv (call_method sv "summary" [])
48   method hostName =
49     string_of_sv (call_method sv "hostName" [])
50
51   (* method directoryCategory *)
52
53 end
54
55 (* let new_ = ... *)