1package WebService::Technorati::SearchTerm;
2use strict;
3use utf8;
4
5use WebService::Technorati::BaseTechnoratiObject;
6use base 'WebService::Technorati::BaseTechnoratiObject';
7
8use fields qw(inboundblogs query querycount querytime rankingstart);
9
10
11BEGIN {
12    use vars qw ($VERSION $DEBUG);
13    $VERSION    = 0.04;
14    $DEBUG       = 0;
15}
16
17=head2 getInboundblogs
18
19 Usage     : getInboundblogs();
20 Purpose   :
21 Returns   : a scalar string
22 Argument  : none
23 Throws    : none
24 Comments  :
25See Also   : WebService::Technorati
26
27=cut
28
29
30=head2 setInboundblogs
31
32 Usage     : setInboundblogs(string);
33 Purpose   :
34 Returns   : void
35 Argument  : a scalar string
36 Throws    : none
37 Comments  :
38See Also   : WebService::Technorati
39
40=cut
41
42
43=head2 getQuery
44
45 Usage     : getQuery();
46 Purpose   :
47 Returns   : a scalar string
48 Argument  : none
49 Throws    : none
50 Comments  :
51See Also   : WebService::Technorati
52
53=cut
54
55
56=head2 setQuery
57
58 Usage     : setQuery(string);
59 Purpose   :
60 Returns   : void
61 Argument  : a scalar string
62 Throws    : none
63 Comments  :
64See Also   : WebService::Technorati
65
66=cut
67
68
69=head2 getQuerycount
70
71 Usage     : getQuerycount();
72 Purpose   :
73 Returns   : a scalar string
74 Argument  : none
75 Throws    : none
76 Comments  :
77See Also   : WebService::Technorati
78
79=cut
80
81
82=head2 setQuerycount
83
84 Usage     : setQuerycount(string);
85 Purpose   :
86 Returns   : void
87 Argument  : a scalar string
88 Throws    : none
89 Comments  :
90See Also   : WebService::Technorati
91
92=cut
93
94
95=head2 getQuerytime
96
97 Usage     : getQuerytime();
98 Purpose   :
99 Returns   : a scalar string
100 Argument  : none
101 Throws    : none
102 Comments  :
103See Also   : WebService::Technorati
104
105=cut
106
107
108=head2 setQuerytime
109
110 Usage     : setQuerytime(string);
111 Purpose   :
112 Returns   : void
113 Argument  : a scalar string
114 Throws    : none
115 Comments  :
116See Also   : WebService::Technorati
117
118=cut
119
120
121=head2 getRankingstart
122
123 Usage     : getRankingstart();
124 Purpose   :
125 Returns   : a scalar string
126 Argument  : none
127 Throws    : none
128 Comments  :
129See Also   : WebService::Technorati
130
131=cut
132
133
134=head2 setRankingstart
135
136 Usage     : setRankingstart(string);
137 Purpose   :
138 Returns   : void
139 Argument  : a scalar string
140 Throws    : none
141 Comments  :
142See Also   : WebService::Technorati
143
144=cut
145
146
147use WebService::Technorati::Blog;
148
149{
150    my %_attrs = (
151        inboundblogs => undef,
152        query => undef,
153        querycount => undef,
154        querytime => undef,
155        rankingstart => undef
156    );
157    sub _accessible {
158        if ($DEBUG) {
159            print __PACKAGE__ . ": checking for attr [$_[1]]\n";
160        }
161        return exists($_attrs{$_[1]});
162    }
163}
164
165sub new_from_node {
166    my $class = shift;
167    my $node = shift;
168    my $data = {
169        inboundblogs => $node->findvalue('inboundblogs')->string_value(),
170        query => $node->findvalue('query')->string_value(),
171        querycount => $node->findvalue('querycount')->string_value(),
172        querytime => $node->findvalue('querytime')->string_value(),
173        rankingstart => $node->findvalue('rankingstart')->string_value(),
174    };
175    my $self = bless ($data, ref ($class) || $class);
176    return $self;
177}
178
1791;
180
181