topsy 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/README.markdown +3 -0
- data/Rakefile +8 -0
- data/TODO +1 -3
- data/VERSION +1 -1
- data/changelog.markdown +13 -2
- data/lib/topsy.rb +15 -15
- data/lib/topsy/client.rb +18 -8
- data/lib/topsy/linkpost.rb +10 -11
- data/lib/topsy/page.rb +12 -1
- data/test/fixtures/authorsearch-page2.json +115 -0
- data/test/fixtures/linkposts-page2.json +75 -0
- data/test/fixtures/search.json +1 -1
- data/test/test_topsy.rb +58 -18
- data/topsy.gemspec +5 -96
- metadata +4 -95
- data/.yardoc/checksums +0 -14
- data/.yardoc/objects/Topsy.dat +0 -0
- data/.yardoc/objects/Topsy/Author.dat +0 -0
- data/.yardoc/objects/Topsy/Author/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/Author/type_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client.dat +0 -0
- data/.yardoc/objects/Topsy/Client/author_info_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/author_search_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/credit_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/get_rate_limit_status_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/handle_response_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/link_post_count_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/link_posts_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/mashup_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/profile_search_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/raise_errors_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/related_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/search_count_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/search_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/stats_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/tags_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/trackbacks_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/trending_i.dat +0 -0
- data/.yardoc/objects/Topsy/Client/url_info_i.dat +0 -0
- data/.yardoc/objects/Topsy/LinkSearchResult.dat +0 -0
- data/.yardoc/objects/Topsy/LinkSearchResult/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/Linkpost.dat +0 -0
- data/.yardoc/objects/Topsy/Linkpost/target_3D_i.dat +0 -0
- data/.yardoc/objects/Topsy/Linkpost/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/LinkpostCount.dat +0 -0
- data/.yardoc/objects/Topsy/LinkpostCount/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/Page.dat +0 -0
- data/.yardoc/objects/Topsy/Page/initialize_i.dat +0 -0
- data/.yardoc/objects/Topsy/Page/list_3D_i.dat +0 -0
- data/.yardoc/objects/Topsy/Page/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/RateLimitInfo.dat +0 -0
- data/.yardoc/objects/Topsy/RateLimitInfo/refresh_in_seconds_i.dat +0 -0
- data/.yardoc/objects/Topsy/RateLimitInfo/reset_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/all_time_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/hour_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/month_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/overall_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/this_hour_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/this_month_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/this_week_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/today_i.dat +0 -0
- data/.yardoc/objects/Topsy/SearchCounts/week_i.dat +0 -0
- data/.yardoc/objects/Topsy/Stats.dat +0 -0
- data/.yardoc/objects/Topsy/Stats/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/Tag.dat +0 -0
- data/.yardoc/objects/Topsy/Tag/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/Target.dat +0 -0
- data/.yardoc/objects/Topsy/Target/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/Trend.dat +0 -0
- data/.yardoc/objects/Topsy/Trend/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/Tweet.dat +0 -0
- data/.yardoc/objects/Topsy/Tweet/author_3D_i.dat +0 -0
- data/.yardoc/objects/Topsy/Tweet/target_3D_i.dat +0 -0
- data/.yardoc/objects/Topsy/Tweet/to_s_i.dat +0 -0
- data/.yardoc/objects/Topsy/UrlInfo.dat +0 -0
- data/.yardoc/objects/Topsy/UrlInfo/to_s_i.dat +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/doc/Topsy.html +0 -112
- data/doc/Topsy/Author.html +0 -201
- data/doc/Topsy/Client.html +0 -2096
- data/doc/Topsy/LinkSearchResult.html +0 -152
- data/doc/Topsy/Linkpost.html +0 -209
- data/doc/Topsy/LinkpostCount.html +0 -152
- data/doc/Topsy/Page.html +0 -284
- data/doc/Topsy/RateLimitInfo.html +0 -201
- data/doc/Topsy/SearchCounts.html +0 -91
- data/doc/Topsy/Stats.html +0 -152
- data/doc/Topsy/Tag.html +0 -152
- data/doc/Topsy/Target.html +0 -152
- data/doc/Topsy/Trend.html +0 -152
- data/doc/Topsy/Tweet.html +0 -266
- data/doc/Topsy/UrlInfo.html +0 -152
- data/doc/_index.html +0 -245
- data/doc/class_list.html +0 -177
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -23
- data/doc/css/style.css +0 -263
- data/doc/file.README.html +0 -151
- data/doc/file_list.html +0 -29
- data/doc/index.html +0 -151
- data/doc/js/app.js +0 -91
- data/doc/js/full_list.js +0 -39
- data/doc/js/jquery.js +0 -19
- data/doc/method_list.html +0 -352
- data/doc/top-level-namespace.html +0 -79
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/.yardoc/objects/root.dat
DELETED
Binary file
|
data/.yardoc/proxy_types
DELETED
Binary file
|
data/doc/Topsy.html
DELETED
@@ -1,112 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
-
<title>Module: Topsy</title>
|
7
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div id="header">
|
20
|
-
<div id="menu">
|
21
|
-
|
22
|
-
<a href="_index.html">Index (T)</a> »
|
23
|
-
|
24
|
-
|
25
|
-
<span class="title">Topsy</span>
|
26
|
-
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<div id="search">
|
30
|
-
<a id="class_list_link" href="#">Namespace List</a>
|
31
|
-
<a id="method_list_link" href="#">Method List</a>
|
32
|
-
<a id ="file_list_link" href="#">File List</a>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div class="clear"></div>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<iframe id="search_frame"></iframe>
|
39
|
-
|
40
|
-
<div id="content"><h1>Module: Topsy
|
41
|
-
|
42
|
-
|
43
|
-
</h1>
|
44
|
-
|
45
|
-
<dl class="box">
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
<dt class="r1 last">Defined in:</dt>
|
54
|
-
<dd class="r1 last">lib/topsy/tag.rb<span class="defines">,<br />
|
55
|
-
lib/topsy/page.rb,<br /> lib/topsy/tweet.rb,<br /> lib/topsy/stats.rb,<br /> lib/topsy/trend.rb,<br /> lib/topsy/author.rb,<br /> lib/topsy/target.rb,<br /> lib/topsy/client.rb,<br /> lib/topsy/linkpost.rb,<br /> lib/topsy/url_info.rb,<br /> lib/topsy/search_counts.rb,<br /> lib/topsy/linkpost_count.rb,<br /> lib/topsy/rate_limit_info.rb,<br /> lib/topsy/link_search_result.rb</span>
|
56
|
-
</dd>
|
57
|
-
|
58
|
-
</dl>
|
59
|
-
<div class="clear"></div>
|
60
|
-
|
61
|
-
<h2>Overview</h2><div class="docstring">
|
62
|
-
<div class="discussion">
|
63
|
-
<p>
|
64
|
-
This is the link_search_result class for the topsy library. A
|
65
|
-
LinkSearchResult has the following attributes:
|
66
|
-
</p>
|
67
|
-
<pre class="code">
|
68
|
-
<span class='string val'>"trackback_permalink"</span> <span class='colon op'>:</span> <span class='string val'>"http://twitter.com/ewerickson/status/3562164195"</span><span class='comma token'>,</span>
|
69
|
-
<span class='string val'>"hits"</span> <span class='colon op'>:</span> <span class='integer val'>38</span><span class='comma token'>,</span>
|
70
|
-
<span class='string val'>"trackback_total"</span> <span class='colon op'>:</span> <span class='integer val'>157</span><span class='comma token'>,</span>
|
71
|
-
<span class='string val'>"topsy_trackback_url"</span> <span class='colon op'>:</span> <span class='string val'>"http://topsy.com/tb/www.redstate.com/erick/2009/08/26/breaking-rumors-surface-that-leon-panetta-is-resigning/"</span><span class='comma token'>,</span>
|
72
|
-
<span class='string val'>"url"</span> <span class='colon op'>:</span> <span class='string val'>"http://www.redstate.com/erick/2009/08/26/breaking-rumors-surface-that-leon-panetta-is-resigning/"</span><span class='comma token'>,</span>
|
73
|
-
<span class='string val'>"content"</span> <span class='colon op'>:</span> <span class='string val'>"Panetta is rumored to have sent a resignation letter to Barack Obama today: http://bit.ly/CDMg9"</span><span class='comma token'>,</span>
|
74
|
-
<span class='string val'>"title"</span> <span class='colon op'>:</span> <span class='string val'>"BREAKING: Rumors Surface That Leon Panetta is Resigning - Erickâs blog - RedState"</span><span class='comma token'>,</span>
|
75
|
-
<span class='string val'>"score"</span> <span class='colon op'>:</span> <span class='integer val'>0</span><span class='integer val'>.75521481</span><span class='comma token'>,</span>
|
76
|
-
<span class='string val'>"highlight"</span> <span class='colon op'>:</span> <span class='string val'>"Panetta is rumored to have sent a resignation letter to
|
77
|
-
<span class=\"highlight-term\">Barack</span> <span class=\"highlight-term\">Obama</span> today: http://bit.ly/CDMg9"</span>
|
78
|
-
</pre>
|
79
|
-
<p>
|
80
|
-
According to the official Topsy doc:
|
81
|
-
http://code.google.com/p/otterapi/wiki/Resources?tm=6#/search
|
82
|
-
</p>
|
83
|
-
|
84
|
-
|
85
|
-
</div>
|
86
|
-
</div>
|
87
|
-
<div class="tags">
|
88
|
-
|
89
|
-
</div><h2>Defined Under Namespace</h2>
|
90
|
-
<p class="children">
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<strong class="classes">Classes:</strong> <a href="Topsy/Author.html" title="Author">Author</a>, <a href="Topsy/Client.html" title="Client">Client</a>, <a href="Topsy/LinkSearchResult.html" title="LinkSearchResult">LinkSearchResult</a>, <a href="Topsy/Linkpost.html" title="Linkpost">Linkpost</a>, <a href="Topsy/LinkpostCount.html" title="LinkpostCount">LinkpostCount</a>, <a href="Topsy/Page.html" title="Page">Page</a>, <a href="Topsy/RateLimitInfo.html" title="RateLimitInfo">RateLimitInfo</a>, <a href="Topsy/SearchCounts.html" title="SearchCounts">SearchCounts</a>, <a href="Topsy/Stats.html" title="Stats">Stats</a>, <a href="Topsy/Tag.html" title="Tag">Tag</a>, <a href="Topsy/Target.html" title="Target">Target</a>, <a href="Topsy/Trend.html" title="Trend">Trend</a>, <a href="Topsy/Tweet.html" title="Tweet">Tweet</a>, <a href="Topsy/UrlInfo.html" title="UrlInfo">UrlInfo</a>
|
96
|
-
|
97
|
-
|
98
|
-
</p>
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
</div>
|
104
|
-
|
105
|
-
<div id="footer">
|
106
|
-
Generated on Wed Jan 6 10:31:57 2010 by
|
107
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
108
|
-
0.5.2 (ruby-1.8.6).
|
109
|
-
</div>
|
110
|
-
|
111
|
-
</body>
|
112
|
-
</html>
|
data/doc/Topsy/Author.html
DELETED
@@ -1,201 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
-
<title>Class: Topsy::Author</title>
|
7
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div id="header">
|
20
|
-
<div id="menu">
|
21
|
-
|
22
|
-
<a href="../_index.html">Index (A)</a> »
|
23
|
-
<a href="../Topsy.html" title="Topsy">Topsy</a>
|
24
|
-
»
|
25
|
-
<span class="title">Author</span>
|
26
|
-
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<div id="search">
|
30
|
-
<a id="class_list_link" href="#">Namespace List</a>
|
31
|
-
<a id="method_list_link" href="#">Method List</a>
|
32
|
-
<a id ="file_list_link" href="#">File List</a>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div class="clear"></div>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<iframe id="search_frame"></iframe>
|
39
|
-
|
40
|
-
<div id="content"><h1>Class: Topsy::Author
|
41
|
-
|
42
|
-
|
43
|
-
</h1>
|
44
|
-
|
45
|
-
<dl class="box">
|
46
|
-
|
47
|
-
<dt class="r1">Inherits:</dt>
|
48
|
-
<dd class="r1">
|
49
|
-
<span class="inheritName">Hashie::Mash</span>
|
50
|
-
|
51
|
-
<ul class="fullTree">
|
52
|
-
<li>Object</li>
|
53
|
-
|
54
|
-
<li class="next">Hashie::Mash</li>
|
55
|
-
|
56
|
-
<li class="next">Topsy::Author</li>
|
57
|
-
|
58
|
-
</ul>
|
59
|
-
<a href="#" class="inheritanceTree">show all</a>
|
60
|
-
|
61
|
-
</dd>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
<dt class="r2 last">Defined in:</dt>
|
71
|
-
<dd class="r2 last">lib/topsy/author.rb</dd>
|
72
|
-
|
73
|
-
</dl>
|
74
|
-
<div class="clear"></div>
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
<h2>Instance Method Summary</h2>
|
81
|
-
|
82
|
-
<ul class="summary">
|
83
|
-
|
84
|
-
<li class="public ">
|
85
|
-
<span class="summary_signature">
|
86
|
-
|
87
|
-
<a href="#to_s-instance_method" title="#to_s (instance method)">- (Object) <strong>to_s</strong> </a>
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
</span>
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
<span class="summary_desc"></span>
|
100
|
-
|
101
|
-
</li>
|
102
|
-
|
103
|
-
|
104
|
-
<li class="public ">
|
105
|
-
<span class="summary_signature">
|
106
|
-
|
107
|
-
<a href="#type-instance_method" title="#type (instance method)">- (Object) <strong>type</strong> </a>
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
</span>
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
<span class="summary_desc"></span>
|
120
|
-
|
121
|
-
</li>
|
122
|
-
|
123
|
-
|
124
|
-
</ul>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
<div id="instance_method_details" class="method_details_list">
|
129
|
-
<h2>Instance Method Details</h2>
|
130
|
-
|
131
|
-
|
132
|
-
<div class="method_details first">
|
133
|
-
<p class="signature first" id="to_s-instance_method">
|
134
|
-
|
135
|
-
- (<tt>Object</tt>) <strong>to_s</strong>
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
</p><table class="source_code">
|
140
|
-
<tr>
|
141
|
-
<td>
|
142
|
-
<pre class="lines">
|
143
|
-
|
144
|
-
|
145
|
-
15
|
146
|
-
16
|
147
|
-
17</pre>
|
148
|
-
</td>
|
149
|
-
<td>
|
150
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/author.rb', line 15</span>
|
151
|
-
|
152
|
-
<span class='def def kw'>def</span> <span class='to_s identifier id'>to_s</span>
|
153
|
-
<span class='dstring node'>"Topsy Author: #{name}, @#{nick}, #{topsy_author_url}"</span>
|
154
|
-
<span class='end end kw'>end</span>
|
155
|
-
</pre>
|
156
|
-
</td>
|
157
|
-
</tr>
|
158
|
-
</table>
|
159
|
-
</div>
|
160
|
-
|
161
|
-
<div class="method_details ">
|
162
|
-
<p class="signature " id="type-instance_method">
|
163
|
-
|
164
|
-
- (<tt>Object</tt>) <strong>type</strong>
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
</p><table class="source_code">
|
169
|
-
<tr>
|
170
|
-
<td>
|
171
|
-
<pre class="lines">
|
172
|
-
|
173
|
-
|
174
|
-
19
|
175
|
-
20
|
176
|
-
21</pre>
|
177
|
-
</td>
|
178
|
-
<td>
|
179
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/author.rb', line 19</span>
|
180
|
-
|
181
|
-
<span class='def def kw'>def</span> <span class='type identifier id'>type</span>
|
182
|
-
<span class='self self kw'>self</span><span class='lbrack token'>[</span><span class='symbol val'>:type</span><span class='rbrack token'>]</span>
|
183
|
-
<span class='end end kw'>end</span>
|
184
|
-
</pre>
|
185
|
-
</td>
|
186
|
-
</tr>
|
187
|
-
</table>
|
188
|
-
</div>
|
189
|
-
|
190
|
-
</div>
|
191
|
-
|
192
|
-
</div>
|
193
|
-
|
194
|
-
<div id="footer">
|
195
|
-
Generated on Wed Jan 6 10:31:55 2010 by
|
196
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
197
|
-
0.5.2 (ruby-1.8.6).
|
198
|
-
</div>
|
199
|
-
|
200
|
-
</body>
|
201
|
-
</html>
|
data/doc/Topsy/Client.html
DELETED
@@ -1,2096 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta name="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
-
<title>Class: Topsy::Client</title>
|
7
|
-
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
-
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
-
|
10
|
-
<script type="text/javascript" charset="utf-8">
|
11
|
-
relpath = '..';
|
12
|
-
if (relpath != '') relpath += '/';
|
13
|
-
</script>
|
14
|
-
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
16
|
-
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div id="header">
|
20
|
-
<div id="menu">
|
21
|
-
|
22
|
-
<a href="../_index.html">Index (C)</a> »
|
23
|
-
<a href="../Topsy.html" title="Topsy">Topsy</a>
|
24
|
-
»
|
25
|
-
<span class="title">Client</span>
|
26
|
-
|
27
|
-
</div>
|
28
|
-
|
29
|
-
<div id="search">
|
30
|
-
<a id="class_list_link" href="#">Namespace List</a>
|
31
|
-
<a id="method_list_link" href="#">Method List</a>
|
32
|
-
<a id ="file_list_link" href="#">File List</a>
|
33
|
-
</div>
|
34
|
-
|
35
|
-
<div class="clear"></div>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<iframe id="search_frame"></iframe>
|
39
|
-
|
40
|
-
<div id="content"><h1>Class: Topsy::Client
|
41
|
-
|
42
|
-
|
43
|
-
</h1>
|
44
|
-
|
45
|
-
<dl class="box">
|
46
|
-
|
47
|
-
<dt class="r1">Inherits:</dt>
|
48
|
-
<dd class="r1">
|
49
|
-
<span class="inheritName">Object</span>
|
50
|
-
|
51
|
-
<ul class="fullTree">
|
52
|
-
<li>Object</li>
|
53
|
-
|
54
|
-
<li class="next">Topsy::Client</li>
|
55
|
-
|
56
|
-
</ul>
|
57
|
-
<a href="#" class="inheritanceTree">show all</a>
|
58
|
-
|
59
|
-
</dd>
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<dt class="r2">Includes:</dt>
|
67
|
-
<dd class="r2">HTTParty</dd>
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<dt class="r1 last">Defined in:</dt>
|
73
|
-
<dd class="r1 last">lib/topsy/client.rb</dd>
|
74
|
-
|
75
|
-
</dl>
|
76
|
-
<div class="clear"></div>
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
<h2>Instance Method Summary</h2>
|
83
|
-
|
84
|
-
<ul class="summary">
|
85
|
-
|
86
|
-
<li class="public ">
|
87
|
-
<span class="summary_signature">
|
88
|
-
|
89
|
-
<a href="#author_info-instance_method" title="#author_info (instance method)">- (Topsy::Author) <strong>author_info</strong>(url) </a>
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
</span>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
<span class="summary_desc">
|
102
|
-
Returns Profile information for an author (a twitter profile indexed by
|
103
|
-
Topsy).
|
104
|
-
|
105
|
-
</span>
|
106
|
-
|
107
|
-
</li>
|
108
|
-
|
109
|
-
|
110
|
-
<li class="public ">
|
111
|
-
<span class="summary_signature">
|
112
|
-
|
113
|
-
<a href="#author_search-instance_method" title="#author_search (instance method)">- (Hashie::Mash) <strong>author_search</strong>(q, options = {}) </a>
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
</span>
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
<span class="summary_desc">
|
126
|
-
Returns list of authors that talk about the query.
|
127
|
-
|
128
|
-
</span>
|
129
|
-
|
130
|
-
</li>
|
131
|
-
|
132
|
-
|
133
|
-
<li class="public ">
|
134
|
-
<span class="summary_signature">
|
135
|
-
|
136
|
-
<a href="#credit-instance_method" title="#credit (instance method)">- (RateLimitInfo) <strong>credit</strong> </a>
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
</span>
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
<span class="summary_desc">
|
149
|
-
Returns info about API rate limiting.
|
150
|
-
|
151
|
-
</span>
|
152
|
-
|
153
|
-
</li>
|
154
|
-
|
155
|
-
|
156
|
-
<li class="public ">
|
157
|
-
<span class="summary_signature">
|
158
|
-
|
159
|
-
<a href="#link_post_count-instance_method" title="#link_post_count (instance method)">- (Topsy::LinkpostCount) <strong>link_post_count</strong>(url, options = {}) </a>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
</span>
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
<span class="summary_desc">
|
172
|
-
Returns count of links posted by an author.
|
173
|
-
|
174
|
-
</span>
|
175
|
-
|
176
|
-
</li>
|
177
|
-
|
178
|
-
|
179
|
-
<li class="public ">
|
180
|
-
<span class="summary_signature">
|
181
|
-
|
182
|
-
<a href="#link_posts-instance_method" title="#link_posts (instance method)">- (Topsy::Page) <strong>link_posts</strong>(url, options = {}) </a>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
</span>
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
<span class="summary_desc">
|
195
|
-
Returns list of URLs posted by an author.
|
196
|
-
|
197
|
-
</span>
|
198
|
-
|
199
|
-
</li>
|
200
|
-
|
201
|
-
|
202
|
-
<li class="public ">
|
203
|
-
<span class="summary_signature">
|
204
|
-
|
205
|
-
<a href="#profile_search-instance_method" title="#profile_search (instance method)">- (Topsy::Page) <strong>profile_search</strong>(q, options = {}) </a>
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
</span>
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
<span class="summary_desc">
|
218
|
-
Returns list list of author profiles that match the query.
|
219
|
-
|
220
|
-
</span>
|
221
|
-
|
222
|
-
</li>
|
223
|
-
|
224
|
-
|
225
|
-
<li class="public ">
|
226
|
-
<span class="summary_signature">
|
227
|
-
|
228
|
-
<a href="#related-instance_method" title="#related (instance method)">- (Topsy::Page) <strong>related</strong>(url, options = {}) </a>
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
</span>
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
<span class="summary_desc">
|
241
|
-
Returns list of URLs related to a given URL.
|
242
|
-
|
243
|
-
</span>
|
244
|
-
|
245
|
-
</li>
|
246
|
-
|
247
|
-
|
248
|
-
<li class="public ">
|
249
|
-
<span class="summary_signature">
|
250
|
-
|
251
|
-
<a href="#search-instance_method" title="#search (instance method)">- (Topsy::Page) <strong>search</strong>(q, options = {}) </a>
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
</span>
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
<span class="summary_desc">
|
264
|
-
Returns list of results for a query.
|
265
|
-
|
266
|
-
</span>
|
267
|
-
|
268
|
-
</li>
|
269
|
-
|
270
|
-
|
271
|
-
<li class="public ">
|
272
|
-
<span class="summary_signature">
|
273
|
-
|
274
|
-
<a href="#search_count-instance_method" title="#search_count (instance method)">- (Topsy::SearchCounts) <strong>search_count</strong>(q) </a>
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
</span>
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
<span class="summary_desc">
|
287
|
-
Returns count of results for a search query.
|
288
|
-
|
289
|
-
</span>
|
290
|
-
|
291
|
-
</li>
|
292
|
-
|
293
|
-
|
294
|
-
<li class="public ">
|
295
|
-
<span class="summary_signature">
|
296
|
-
|
297
|
-
<a href="#stats-instance_method" title="#stats (instance method)">- (Topsy::Stats) <strong>stats</strong>(url, options = {}) </a>
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
</span>
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
<span class="summary_desc">
|
310
|
-
Returns counts of tweets for a URL.
|
311
|
-
|
312
|
-
</span>
|
313
|
-
|
314
|
-
</li>
|
315
|
-
|
316
|
-
|
317
|
-
<li class="public ">
|
318
|
-
<span class="summary_signature">
|
319
|
-
|
320
|
-
<a href="#tags-instance_method" title="#tags (instance method)">- (Topsy::Page) <strong>tags</strong>(url, options = {}) </a>
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
</span>
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
<span class="summary_desc">
|
333
|
-
Returns list of tags for a URL.
|
334
|
-
|
335
|
-
</span>
|
336
|
-
|
337
|
-
</li>
|
338
|
-
|
339
|
-
|
340
|
-
<li class="public ">
|
341
|
-
<span class="summary_signature">
|
342
|
-
|
343
|
-
<a href="#trackbacks-instance_method" title="#trackbacks (instance method)">- (Topsy::Page) <strong>trackbacks</strong>(url, options = {}) </a>
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
</span>
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
<span class="summary_desc">
|
356
|
-
Returns list of tweets (trackbacks) that mention the query URL, most recent
|
357
|
-
first.
|
358
|
-
|
359
|
-
</span>
|
360
|
-
|
361
|
-
</li>
|
362
|
-
|
363
|
-
|
364
|
-
<li class="public ">
|
365
|
-
<span class="summary_signature">
|
366
|
-
|
367
|
-
<a href="#trending-instance_method" title="#trending (instance method)">- (Hashie::Mash) <strong>trending</strong>(options = {}) </a>
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
</span>
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
<span class="summary_desc">
|
380
|
-
Returns list of trending terms.
|
381
|
-
|
382
|
-
</span>
|
383
|
-
|
384
|
-
</li>
|
385
|
-
|
386
|
-
|
387
|
-
<li class="public ">
|
388
|
-
<span class="summary_signature">
|
389
|
-
|
390
|
-
<a href="#url_info-instance_method" title="#url_info (instance method)">- (Topsy::UrlInfo) <strong>url_info</strong>(url) </a>
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
</span>
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
<span class="summary_desc">
|
403
|
-
Returns info about a URL.
|
404
|
-
|
405
|
-
</span>
|
406
|
-
|
407
|
-
</li>
|
408
|
-
|
409
|
-
|
410
|
-
</ul>
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
<div id="instance_method_details" class="method_details_list">
|
415
|
-
<h2>Instance Method Details</h2>
|
416
|
-
|
417
|
-
|
418
|
-
<div class="method_details first">
|
419
|
-
<p class="signature first" id="author_info-instance_method">
|
420
|
-
|
421
|
-
- (<tt><a href="Author.html" title="Topsy::Author">Topsy::Author</a></tt>) <strong>author_info</strong>(url)
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
</p><div class="docstring">
|
426
|
-
<div class="discussion">
|
427
|
-
<p>
|
428
|
-
Returns Profile information for an author (a twitter profile indexed by
|
429
|
-
Topsy). The response contains the name, description (biography) and the
|
430
|
-
influence level of the author
|
431
|
-
</p>
|
432
|
-
|
433
|
-
|
434
|
-
</div>
|
435
|
-
</div>
|
436
|
-
<div class="tags">
|
437
|
-
<h3>Parameters:</h3>
|
438
|
-
<ul class="param">
|
439
|
-
|
440
|
-
<li>
|
441
|
-
|
442
|
-
<span class='type'>(<tt>String</tt>)</span>
|
443
|
-
|
444
|
-
|
445
|
-
<span class='name'>url</span>
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
—
|
450
|
-
|
451
|
-
URL string for the author.
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
</li>
|
456
|
-
|
457
|
-
</ul>
|
458
|
-
<h3>Returns:</h3>
|
459
|
-
<ul class="return">
|
460
|
-
|
461
|
-
<li>
|
462
|
-
|
463
|
-
<span class='type'>(<tt><a href="Author.html" title="Topsy::Author">Topsy::Author</a></tt>)</span>
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
</li>
|
469
|
-
|
470
|
-
</ul>
|
471
|
-
|
472
|
-
</div><table class="source_code">
|
473
|
-
<tr>
|
474
|
-
<td>
|
475
|
-
<pre class="lines">
|
476
|
-
|
477
|
-
|
478
|
-
18
|
479
|
-
19
|
480
|
-
20
|
481
|
-
21</pre>
|
482
|
-
</td>
|
483
|
-
<td>
|
484
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 18</span>
|
485
|
-
|
486
|
-
<span class='def def kw'>def</span> <span class='author_info identifier id'>author_info</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='rparen token'>)</span>
|
487
|
-
<span class='authorinfo identifier id'>authorinfo</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/authorinfo.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
488
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Author constant id'>Author</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='authorinfo identifier id'>authorinfo</span><span class='rparen token'>)</span>
|
489
|
-
<span class='end end kw'>end</span>
|
490
|
-
</pre>
|
491
|
-
</td>
|
492
|
-
</tr>
|
493
|
-
</table>
|
494
|
-
</div>
|
495
|
-
|
496
|
-
<div class="method_details ">
|
497
|
-
<p class="signature " id="author_search-instance_method">
|
498
|
-
|
499
|
-
- (<tt>Hashie::Mash</tt>) <strong>author_search</strong>(q, options = {})
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
</p><div class="docstring">
|
504
|
-
<div class="discussion">
|
505
|
-
<p>
|
506
|
-
Returns list of authors that talk about the query. The list is sorted by
|
507
|
-
frequency of posts and the influence of authors.
|
508
|
-
</p>
|
509
|
-
|
510
|
-
|
511
|
-
</div>
|
512
|
-
</div>
|
513
|
-
<div class="tags">
|
514
|
-
<h3>Parameters:</h3>
|
515
|
-
<ul class="param">
|
516
|
-
|
517
|
-
<li>
|
518
|
-
|
519
|
-
<span class='type'>(<tt>String</tt>)</span>
|
520
|
-
|
521
|
-
|
522
|
-
<span class='name'>q</span>
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
—
|
527
|
-
|
528
|
-
the search query string
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
</li>
|
533
|
-
|
534
|
-
<li>
|
535
|
-
|
536
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
537
|
-
|
538
|
-
|
539
|
-
<span class='name'>options</span>
|
540
|
-
|
541
|
-
|
542
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
543
|
-
|
544
|
-
|
545
|
-
—
|
546
|
-
|
547
|
-
method options
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
</li>
|
552
|
-
|
553
|
-
</ul>
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
561
|
-
<ul class="option">
|
562
|
-
|
563
|
-
<li>
|
564
|
-
<span class="type">(<tt>String</tt>)</span>
|
565
|
-
<span class="name">:window</span>
|
566
|
-
<span class="default">
|
567
|
-
|
568
|
-
<span class="na">N/A</span>
|
569
|
-
|
570
|
-
</span>
|
571
|
-
—
|
572
|
-
Time window for results. (default: ‘a’) Options: auto -
|
573
|
-
automatically pick the most recent and relevant window. h last hour, d last
|
574
|
-
day, w last week, m last month, a all time
|
575
|
-
|
576
|
-
|
577
|
-
</tr>
|
578
|
-
|
579
|
-
<li>
|
580
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
581
|
-
<span class="name">:page</span>
|
582
|
-
<span class="default">
|
583
|
-
|
584
|
-
<span class="na">N/A</span>
|
585
|
-
|
586
|
-
</span>
|
587
|
-
—
|
588
|
-
page number of the result set. (default: 1, max: 10)
|
589
|
-
|
590
|
-
|
591
|
-
</tr>
|
592
|
-
|
593
|
-
<li>
|
594
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
595
|
-
<span class="name">:perpage</span>
|
596
|
-
<span class="default">
|
597
|
-
|
598
|
-
<span class="na">N/A</span>
|
599
|
-
|
600
|
-
</span>
|
601
|
-
—
|
602
|
-
limit number of results per page. (default: 10, max: 50)
|
603
|
-
|
604
|
-
|
605
|
-
</tr>
|
606
|
-
|
607
|
-
</ul>
|
608
|
-
|
609
|
-
<h3>Returns:</h3>
|
610
|
-
<ul class="return">
|
611
|
-
|
612
|
-
<li>
|
613
|
-
|
614
|
-
<span class='type'>(<tt>Hashie::Mash</tt>)</span>
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
</li>
|
620
|
-
|
621
|
-
</ul>
|
622
|
-
|
623
|
-
</div><table class="source_code">
|
624
|
-
<tr>
|
625
|
-
<td>
|
626
|
-
<pre class="lines">
|
627
|
-
|
628
|
-
|
629
|
-
31
|
630
|
-
32
|
631
|
-
33</pre>
|
632
|
-
</td>
|
633
|
-
<td>
|
634
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 31</span>
|
635
|
-
|
636
|
-
<span class='def def kw'>def</span> <span class='author_search identifier id'>author_search</span><span class='lparen token'>(</span><span class='q identifier id'>q</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
637
|
-
<span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/authorsearch.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:q</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='q identifier id'>q</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
638
|
-
<span class='end end kw'>end</span>
|
639
|
-
</pre>
|
640
|
-
</td>
|
641
|
-
</tr>
|
642
|
-
</table>
|
643
|
-
</div>
|
644
|
-
|
645
|
-
<div class="method_details ">
|
646
|
-
<p class="signature " id="credit-instance_method">
|
647
|
-
|
648
|
-
- (<tt><a href="RateLimitInfo.html" title="RateLimitInfo">RateLimitInfo</a></tt>) <strong>credit</strong>
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
</p><div class="docstring">
|
653
|
-
<div class="discussion">
|
654
|
-
<p>
|
655
|
-
Returns info about API rate limiting
|
656
|
-
</p>
|
657
|
-
|
658
|
-
|
659
|
-
</div>
|
660
|
-
</div>
|
661
|
-
<div class="tags">
|
662
|
-
<h3>Returns:</h3>
|
663
|
-
<ul class="return">
|
664
|
-
|
665
|
-
<li>
|
666
|
-
|
667
|
-
<span class='type'>(<tt><a href="RateLimitInfo.html" title="RateLimitInfo">RateLimitInfo</a></tt>)</span>
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
</li>
|
673
|
-
|
674
|
-
</ul>
|
675
|
-
|
676
|
-
</div><table class="source_code">
|
677
|
-
<tr>
|
678
|
-
<td>
|
679
|
-
<pre class="lines">
|
680
|
-
|
681
|
-
|
682
|
-
10
|
683
|
-
11
|
684
|
-
12</pre>
|
685
|
-
</td>
|
686
|
-
<td>
|
687
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 10</span>
|
688
|
-
|
689
|
-
<span class='def def kw'>def</span> <span class='credit identifier id'>credit</span>
|
690
|
-
<span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/credit.json"</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
691
|
-
<span class='end end kw'>end</span>
|
692
|
-
</pre>
|
693
|
-
</td>
|
694
|
-
</tr>
|
695
|
-
</table>
|
696
|
-
</div>
|
697
|
-
|
698
|
-
<div class="method_details ">
|
699
|
-
<p class="signature " id="link_post_count-instance_method">
|
700
|
-
|
701
|
-
- (<tt><a href="LinkpostCount.html" title="Topsy::LinkpostCount">Topsy::LinkpostCount</a></tt>) <strong>link_post_count</strong>(url, options = {})
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
</p><div class="docstring">
|
706
|
-
<div class="discussion">
|
707
|
-
<p>
|
708
|
-
Returns count of links posted by an author. This is the efficient,
|
709
|
-
count-only version of /linkposts
|
710
|
-
</p>
|
711
|
-
|
712
|
-
|
713
|
-
</div>
|
714
|
-
</div>
|
715
|
-
<div class="tags">
|
716
|
-
<h3>Parameters:</h3>
|
717
|
-
<ul class="param">
|
718
|
-
|
719
|
-
<li>
|
720
|
-
|
721
|
-
<span class='type'>(<tt>String</tt>)</span>
|
722
|
-
|
723
|
-
|
724
|
-
<span class='name'>url</span>
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
—
|
729
|
-
|
730
|
-
URL string for the author.
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
</li>
|
735
|
-
|
736
|
-
<li>
|
737
|
-
|
738
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
739
|
-
|
740
|
-
|
741
|
-
<span class='name'>options</span>
|
742
|
-
|
743
|
-
|
744
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
745
|
-
|
746
|
-
|
747
|
-
—
|
748
|
-
|
749
|
-
method options
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
</li>
|
754
|
-
|
755
|
-
</ul>
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
763
|
-
<ul class="option">
|
764
|
-
|
765
|
-
<li>
|
766
|
-
<span class="type">(<tt>String</tt>)</span>
|
767
|
-
<span class="name">:contains</span>
|
768
|
-
<span class="default">
|
769
|
-
|
770
|
-
<span class="na">N/A</span>
|
771
|
-
|
772
|
-
</span>
|
773
|
-
—
|
774
|
-
Query string to filter results
|
775
|
-
|
776
|
-
|
777
|
-
</tr>
|
778
|
-
|
779
|
-
</ul>
|
780
|
-
|
781
|
-
<h3>Returns:</h3>
|
782
|
-
<ul class="return">
|
783
|
-
|
784
|
-
<li>
|
785
|
-
|
786
|
-
<span class='type'>(<tt><a href="LinkpostCount.html" title="Topsy::LinkpostCount">Topsy::LinkpostCount</a></tt>)</span>
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
</li>
|
792
|
-
|
793
|
-
</ul>
|
794
|
-
|
795
|
-
</div><table class="source_code">
|
796
|
-
<tr>
|
797
|
-
<td>
|
798
|
-
<pre class="lines">
|
799
|
-
|
800
|
-
|
801
|
-
56
|
802
|
-
57
|
803
|
-
58
|
804
|
-
59</pre>
|
805
|
-
</td>
|
806
|
-
<td>
|
807
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 56</span>
|
808
|
-
|
809
|
-
<span class='def def kw'>def</span> <span class='link_post_count identifier id'>link_post_count</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
810
|
-
<span class='count identifier id'>count</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/linkpostcount.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
811
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='LinkpostCount constant id'>LinkpostCount</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='count identifier id'>count</span><span class='rparen token'>)</span>
|
812
|
-
<span class='end end kw'>end</span>
|
813
|
-
</pre>
|
814
|
-
</td>
|
815
|
-
</tr>
|
816
|
-
</table>
|
817
|
-
</div>
|
818
|
-
|
819
|
-
<div class="method_details ">
|
820
|
-
<p class="signature " id="link_posts-instance_method">
|
821
|
-
|
822
|
-
- (<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>) <strong>link_posts</strong>(url, options = {})
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
</p><div class="docstring">
|
827
|
-
<div class="discussion">
|
828
|
-
<p>
|
829
|
-
Returns list of URLs posted by an author
|
830
|
-
</p>
|
831
|
-
|
832
|
-
|
833
|
-
</div>
|
834
|
-
</div>
|
835
|
-
<div class="tags">
|
836
|
-
<h3>Parameters:</h3>
|
837
|
-
<ul class="param">
|
838
|
-
|
839
|
-
<li>
|
840
|
-
|
841
|
-
<span class='type'>(<tt>String</tt>)</span>
|
842
|
-
|
843
|
-
|
844
|
-
<span class='name'>url</span>
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
—
|
849
|
-
|
850
|
-
URL string for the author.
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
</li>
|
855
|
-
|
856
|
-
<li>
|
857
|
-
|
858
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
859
|
-
|
860
|
-
|
861
|
-
<span class='name'>options</span>
|
862
|
-
|
863
|
-
|
864
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
865
|
-
|
866
|
-
|
867
|
-
—
|
868
|
-
|
869
|
-
method options
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
</li>
|
874
|
-
|
875
|
-
</ul>
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
883
|
-
<ul class="option">
|
884
|
-
|
885
|
-
<li>
|
886
|
-
<span class="type">(<tt>String</tt>)</span>
|
887
|
-
<span class="name">:contains</span>
|
888
|
-
<span class="default">
|
889
|
-
|
890
|
-
<span class="na">N/A</span>
|
891
|
-
|
892
|
-
</span>
|
893
|
-
—
|
894
|
-
Query string to filter results
|
895
|
-
|
896
|
-
|
897
|
-
</tr>
|
898
|
-
|
899
|
-
<li>
|
900
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
901
|
-
<span class="name">:page</span>
|
902
|
-
<span class="default">
|
903
|
-
|
904
|
-
<span class="na">N/A</span>
|
905
|
-
|
906
|
-
</span>
|
907
|
-
—
|
908
|
-
page number of the result set. (default: 1, max: 10)
|
909
|
-
|
910
|
-
|
911
|
-
</tr>
|
912
|
-
|
913
|
-
<li>
|
914
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
915
|
-
<span class="name">:perpage</span>
|
916
|
-
<span class="default">
|
917
|
-
|
918
|
-
<span class="na">N/A</span>
|
919
|
-
|
920
|
-
</span>
|
921
|
-
—
|
922
|
-
limit number of results per page. (default: 10, max: 50)
|
923
|
-
|
924
|
-
|
925
|
-
</tr>
|
926
|
-
|
927
|
-
</ul>
|
928
|
-
|
929
|
-
<h3>Returns:</h3>
|
930
|
-
<ul class="return">
|
931
|
-
|
932
|
-
<li>
|
933
|
-
|
934
|
-
<span class='type'>(<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>)</span>
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
</li>
|
940
|
-
|
941
|
-
</ul>
|
942
|
-
|
943
|
-
</div><table class="source_code">
|
944
|
-
<tr>
|
945
|
-
<td>
|
946
|
-
<pre class="lines">
|
947
|
-
|
948
|
-
|
949
|
-
43
|
950
|
-
44
|
951
|
-
45
|
952
|
-
46
|
953
|
-
47
|
954
|
-
48</pre>
|
955
|
-
</td>
|
956
|
-
<td>
|
957
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 43</span>
|
958
|
-
|
959
|
-
<span class='def def kw'>def</span> <span class='link_posts identifier id'>link_posts</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
960
|
-
<span class='query identifier id'>query</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span>
|
961
|
-
<span class='query identifier id'>query</span><span class='dot token'>.</span><span class='merge! fid id'>merge!</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>
|
962
|
-
<span class='linkposts identifier id'>linkposts</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/linkposts.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='query identifier id'>query</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
963
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Page constant id'>Page</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='linkposts identifier id'>linkposts</span><span class='comma token'>,</span><span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Linkpost constant id'>Linkpost</span><span class='rparen token'>)</span>
|
964
|
-
<span class='end end kw'>end</span>
|
965
|
-
</pre>
|
966
|
-
</td>
|
967
|
-
</tr>
|
968
|
-
</table>
|
969
|
-
</div>
|
970
|
-
|
971
|
-
<div class="method_details ">
|
972
|
-
<p class="signature " id="profile_search-instance_method">
|
973
|
-
|
974
|
-
- (<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>) <strong>profile_search</strong>(q, options = {})
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
</p><div class="docstring">
|
979
|
-
<div class="discussion">
|
980
|
-
<p>
|
981
|
-
Returns list list of author profiles that match the query. The query is
|
982
|
-
matched against the nick, name and biography information and the results
|
983
|
-
are sorted by closeness of match and the influence of authors.
|
984
|
-
</p>
|
985
|
-
|
986
|
-
|
987
|
-
</div>
|
988
|
-
</div>
|
989
|
-
<div class="tags">
|
990
|
-
<h3>Parameters:</h3>
|
991
|
-
<ul class="param">
|
992
|
-
|
993
|
-
<li>
|
994
|
-
|
995
|
-
<span class='type'>(<tt>String</tt>)</span>
|
996
|
-
|
997
|
-
|
998
|
-
<span class='name'>q</span>
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
—
|
1003
|
-
|
1004
|
-
the search query string
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
</li>
|
1009
|
-
|
1010
|
-
<li>
|
1011
|
-
|
1012
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
1013
|
-
|
1014
|
-
|
1015
|
-
<span class='name'>options</span>
|
1016
|
-
|
1017
|
-
|
1018
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1019
|
-
|
1020
|
-
|
1021
|
-
—
|
1022
|
-
|
1023
|
-
method options
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
</li>
|
1028
|
-
|
1029
|
-
</ul>
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
1037
|
-
<ul class="option">
|
1038
|
-
|
1039
|
-
<li>
|
1040
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1041
|
-
<span class="name">:page</span>
|
1042
|
-
<span class="default">
|
1043
|
-
|
1044
|
-
<span class="na">N/A</span>
|
1045
|
-
|
1046
|
-
</span>
|
1047
|
-
—
|
1048
|
-
page number of the result set. (default: 1, max: 10)
|
1049
|
-
|
1050
|
-
|
1051
|
-
</tr>
|
1052
|
-
|
1053
|
-
<li>
|
1054
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1055
|
-
<span class="name">:perpage</span>
|
1056
|
-
<span class="default">
|
1057
|
-
|
1058
|
-
<span class="na">N/A</span>
|
1059
|
-
|
1060
|
-
</span>
|
1061
|
-
—
|
1062
|
-
limit number of results per page. (default: 10, max: 50)
|
1063
|
-
|
1064
|
-
|
1065
|
-
</tr>
|
1066
|
-
|
1067
|
-
</ul>
|
1068
|
-
|
1069
|
-
<h3>Returns:</h3>
|
1070
|
-
<ul class="return">
|
1071
|
-
|
1072
|
-
<li>
|
1073
|
-
|
1074
|
-
<span class='type'>(<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>)</span>
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
</li>
|
1080
|
-
|
1081
|
-
</ul>
|
1082
|
-
|
1083
|
-
</div><table class="source_code">
|
1084
|
-
<tr>
|
1085
|
-
<td>
|
1086
|
-
<pre class="lines">
|
1087
|
-
|
1088
|
-
|
1089
|
-
68
|
1090
|
-
69
|
1091
|
-
70
|
1092
|
-
71</pre>
|
1093
|
-
</td>
|
1094
|
-
<td>
|
1095
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 68</span>
|
1096
|
-
|
1097
|
-
<span class='def def kw'>def</span> <span class='profile_search identifier id'>profile_search</span><span class='lparen token'>(</span><span class='q identifier id'>q</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
1098
|
-
<span class='results identifier id'>results</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/profilesearch.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:q</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='q identifier id'>q</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1099
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Page constant id'>Page</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='results identifier id'>results</span><span class='comma token'>,</span><span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Author constant id'>Author</span><span class='rparen token'>)</span>
|
1100
|
-
<span class='end end kw'>end</span>
|
1101
|
-
</pre>
|
1102
|
-
</td>
|
1103
|
-
</tr>
|
1104
|
-
</table>
|
1105
|
-
</div>
|
1106
|
-
|
1107
|
-
<div class="method_details ">
|
1108
|
-
<p class="signature " id="related-instance_method">
|
1109
|
-
|
1110
|
-
- (<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>) <strong>related</strong>(url, options = {})
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
</p><div class="docstring">
|
1115
|
-
<div class="discussion">
|
1116
|
-
<p>
|
1117
|
-
Returns list of URLs related to a given URL
|
1118
|
-
</p>
|
1119
|
-
|
1120
|
-
|
1121
|
-
</div>
|
1122
|
-
</div>
|
1123
|
-
<div class="tags">
|
1124
|
-
<h3>Parameters:</h3>
|
1125
|
-
<ul class="param">
|
1126
|
-
|
1127
|
-
<li>
|
1128
|
-
|
1129
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1130
|
-
|
1131
|
-
|
1132
|
-
<span class='name'>url</span>
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
—
|
1137
|
-
|
1138
|
-
URL string for the author.
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
</li>
|
1143
|
-
|
1144
|
-
<li>
|
1145
|
-
|
1146
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
1147
|
-
|
1148
|
-
|
1149
|
-
<span class='name'>options</span>
|
1150
|
-
|
1151
|
-
|
1152
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1153
|
-
|
1154
|
-
|
1155
|
-
—
|
1156
|
-
|
1157
|
-
method options
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
</li>
|
1162
|
-
|
1163
|
-
</ul>
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
1171
|
-
<ul class="option">
|
1172
|
-
|
1173
|
-
<li>
|
1174
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1175
|
-
<span class="name">:page</span>
|
1176
|
-
<span class="default">
|
1177
|
-
|
1178
|
-
<span class="na">N/A</span>
|
1179
|
-
|
1180
|
-
</span>
|
1181
|
-
—
|
1182
|
-
page number of the result set. (default: 1, max: 10)
|
1183
|
-
|
1184
|
-
|
1185
|
-
</tr>
|
1186
|
-
|
1187
|
-
<li>
|
1188
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1189
|
-
<span class="name">:perpage</span>
|
1190
|
-
<span class="default">
|
1191
|
-
|
1192
|
-
<span class="na">N/A</span>
|
1193
|
-
|
1194
|
-
</span>
|
1195
|
-
—
|
1196
|
-
limit number of results per page. (default: 10, max: 50)
|
1197
|
-
|
1198
|
-
|
1199
|
-
</tr>
|
1200
|
-
|
1201
|
-
</ul>
|
1202
|
-
|
1203
|
-
<h3>Returns:</h3>
|
1204
|
-
<ul class="return">
|
1205
|
-
|
1206
|
-
<li>
|
1207
|
-
|
1208
|
-
<span class='type'>(<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>)</span>
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
</li>
|
1214
|
-
|
1215
|
-
</ul>
|
1216
|
-
|
1217
|
-
</div><table class="source_code">
|
1218
|
-
<tr>
|
1219
|
-
<td>
|
1220
|
-
<pre class="lines">
|
1221
|
-
|
1222
|
-
|
1223
|
-
80
|
1224
|
-
81
|
1225
|
-
82
|
1226
|
-
83</pre>
|
1227
|
-
</td>
|
1228
|
-
<td>
|
1229
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 80</span>
|
1230
|
-
|
1231
|
-
<span class='def def kw'>def</span> <span class='related identifier id'>related</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
1232
|
-
<span class='response identifier id'>response</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/related.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1233
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Page constant id'>Page</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='response identifier id'>response</span><span class='comma token'>,</span><span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='LinkSearchResult constant id'>LinkSearchResult</span><span class='rparen token'>)</span>
|
1234
|
-
<span class='end end kw'>end</span>
|
1235
|
-
</pre>
|
1236
|
-
</td>
|
1237
|
-
</tr>
|
1238
|
-
</table>
|
1239
|
-
</div>
|
1240
|
-
|
1241
|
-
<div class="method_details ">
|
1242
|
-
<p class="signature " id="search-instance_method">
|
1243
|
-
|
1244
|
-
- (<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>) <strong>search</strong>(q, options = {})
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
</p><div class="docstring">
|
1249
|
-
<div class="discussion">
|
1250
|
-
<p>
|
1251
|
-
Returns list of results for a query.
|
1252
|
-
</p>
|
1253
|
-
|
1254
|
-
|
1255
|
-
</div>
|
1256
|
-
</div>
|
1257
|
-
<div class="tags">
|
1258
|
-
<h3>Parameters:</h3>
|
1259
|
-
<ul class="param">
|
1260
|
-
|
1261
|
-
<li>
|
1262
|
-
|
1263
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1264
|
-
|
1265
|
-
|
1266
|
-
<span class='name'>q</span>
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
—
|
1271
|
-
|
1272
|
-
the search query string
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
</li>
|
1277
|
-
|
1278
|
-
<li>
|
1279
|
-
|
1280
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
1281
|
-
|
1282
|
-
|
1283
|
-
<span class='name'>options</span>
|
1284
|
-
|
1285
|
-
|
1286
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1287
|
-
|
1288
|
-
|
1289
|
-
—
|
1290
|
-
|
1291
|
-
method options
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
</li>
|
1296
|
-
|
1297
|
-
</ul>
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
1305
|
-
<ul class="option">
|
1306
|
-
|
1307
|
-
<li>
|
1308
|
-
<span class="type">(<tt>String</tt>)</span>
|
1309
|
-
<span class="name">:window</span>
|
1310
|
-
<span class="default">
|
1311
|
-
|
1312
|
-
<span class="na">N/A</span>
|
1313
|
-
|
1314
|
-
</span>
|
1315
|
-
—
|
1316
|
-
Time window for results. (default: ‘a’) Options: auto -
|
1317
|
-
automatically pick the most recent and relevant window. h last hour, d last
|
1318
|
-
day, w last week, m last month, a all time
|
1319
|
-
|
1320
|
-
|
1321
|
-
</tr>
|
1322
|
-
|
1323
|
-
<li>
|
1324
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1325
|
-
<span class="name">:page</span>
|
1326
|
-
<span class="default">
|
1327
|
-
|
1328
|
-
<span class="na">N/A</span>
|
1329
|
-
|
1330
|
-
</span>
|
1331
|
-
—
|
1332
|
-
page number of the result set. (default: 1, max: 10)
|
1333
|
-
|
1334
|
-
|
1335
|
-
</tr>
|
1336
|
-
|
1337
|
-
<li>
|
1338
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1339
|
-
<span class="name">:perpage</span>
|
1340
|
-
<span class="default">
|
1341
|
-
|
1342
|
-
<span class="na">N/A</span>
|
1343
|
-
|
1344
|
-
</span>
|
1345
|
-
—
|
1346
|
-
limit number of results per page. (default: 10, max: 50)
|
1347
|
-
|
1348
|
-
|
1349
|
-
</tr>
|
1350
|
-
|
1351
|
-
</ul>
|
1352
|
-
|
1353
|
-
<h3>Returns:</h3>
|
1354
|
-
<ul class="return">
|
1355
|
-
|
1356
|
-
<li>
|
1357
|
-
|
1358
|
-
<span class='type'>(<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>)</span>
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
</li>
|
1364
|
-
|
1365
|
-
</ul>
|
1366
|
-
|
1367
|
-
</div><table class="source_code">
|
1368
|
-
<tr>
|
1369
|
-
<td>
|
1370
|
-
<pre class="lines">
|
1371
|
-
|
1372
|
-
|
1373
|
-
93
|
1374
|
-
94
|
1375
|
-
95
|
1376
|
-
96</pre>
|
1377
|
-
</td>
|
1378
|
-
<td>
|
1379
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 93</span>
|
1380
|
-
|
1381
|
-
<span class='def def kw'>def</span> <span class='search identifier id'>search</span><span class='lparen token'>(</span><span class='q identifier id'>q</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
1382
|
-
<span class='results identifier id'>results</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/search.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:q</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='q identifier id'>q</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1383
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Page constant id'>Page</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='results identifier id'>results</span><span class='comma token'>,</span><span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='LinkSearchResult constant id'>LinkSearchResult</span><span class='rparen token'>)</span>
|
1384
|
-
<span class='end end kw'>end</span>
|
1385
|
-
</pre>
|
1386
|
-
</td>
|
1387
|
-
</tr>
|
1388
|
-
</table>
|
1389
|
-
</div>
|
1390
|
-
|
1391
|
-
<div class="method_details ">
|
1392
|
-
<p class="signature " id="search_count-instance_method">
|
1393
|
-
|
1394
|
-
- (<tt><a href="SearchCounts.html" title="Topsy::SearchCounts">Topsy::SearchCounts</a></tt>) <strong>search_count</strong>(q)
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
</p><div class="docstring">
|
1399
|
-
<div class="discussion">
|
1400
|
-
<p>
|
1401
|
-
Returns count of results for a search query.
|
1402
|
-
</p>
|
1403
|
-
|
1404
|
-
|
1405
|
-
</div>
|
1406
|
-
</div>
|
1407
|
-
<div class="tags">
|
1408
|
-
<h3>Parameters:</h3>
|
1409
|
-
<ul class="param">
|
1410
|
-
|
1411
|
-
<li>
|
1412
|
-
|
1413
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1414
|
-
|
1415
|
-
|
1416
|
-
<span class='name'>q</span>
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
—
|
1421
|
-
|
1422
|
-
the search query string
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
</li>
|
1427
|
-
|
1428
|
-
</ul>
|
1429
|
-
<h3>Returns:</h3>
|
1430
|
-
<ul class="return">
|
1431
|
-
|
1432
|
-
<li>
|
1433
|
-
|
1434
|
-
<span class='type'>(<tt><a href="SearchCounts.html" title="Topsy::SearchCounts">Topsy::SearchCounts</a></tt>)</span>
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
</li>
|
1440
|
-
|
1441
|
-
</ul>
|
1442
|
-
|
1443
|
-
</div><table class="source_code">
|
1444
|
-
<tr>
|
1445
|
-
<td>
|
1446
|
-
<pre class="lines">
|
1447
|
-
|
1448
|
-
|
1449
|
-
102
|
1450
|
-
103
|
1451
|
-
104
|
1452
|
-
105</pre>
|
1453
|
-
</td>
|
1454
|
-
<td>
|
1455
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 102</span>
|
1456
|
-
|
1457
|
-
<span class='def def kw'>def</span> <span class='search_count identifier id'>search_count</span><span class='lparen token'>(</span><span class='q identifier id'>q</span><span class='rparen token'>)</span>
|
1458
|
-
<span class='counts identifier id'>counts</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/searchcount.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:q</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='q identifier id'>q</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1459
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='SearchCounts constant id'>SearchCounts</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='counts identifier id'>counts</span><span class='rparen token'>)</span>
|
1460
|
-
<span class='end end kw'>end</span>
|
1461
|
-
</pre>
|
1462
|
-
</td>
|
1463
|
-
</tr>
|
1464
|
-
</table>
|
1465
|
-
</div>
|
1466
|
-
|
1467
|
-
<div class="method_details ">
|
1468
|
-
<p class="signature " id="stats-instance_method">
|
1469
|
-
|
1470
|
-
- (<tt><a href="Stats.html" title="Topsy::Stats">Topsy::Stats</a></tt>) <strong>stats</strong>(url, options = {})
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
</p><div class="docstring">
|
1475
|
-
<div class="discussion">
|
1476
|
-
<p>
|
1477
|
-
Returns counts of tweets for a URL
|
1478
|
-
</p>
|
1479
|
-
|
1480
|
-
|
1481
|
-
</div>
|
1482
|
-
</div>
|
1483
|
-
<div class="tags">
|
1484
|
-
<h3>Parameters:</h3>
|
1485
|
-
<ul class="param">
|
1486
|
-
|
1487
|
-
<li>
|
1488
|
-
|
1489
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1490
|
-
|
1491
|
-
|
1492
|
-
<span class='name'>url</span>
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
—
|
1497
|
-
|
1498
|
-
the url to look up
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
</li>
|
1503
|
-
|
1504
|
-
<li>
|
1505
|
-
|
1506
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
1507
|
-
|
1508
|
-
|
1509
|
-
<span class='name'>options</span>
|
1510
|
-
|
1511
|
-
|
1512
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1513
|
-
|
1514
|
-
|
1515
|
-
—
|
1516
|
-
|
1517
|
-
method options
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
</li>
|
1522
|
-
|
1523
|
-
</ul>
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
1531
|
-
<ul class="option">
|
1532
|
-
|
1533
|
-
<li>
|
1534
|
-
<span class="type">(<tt>String</tt>)</span>
|
1535
|
-
<span class="name">:contains</span>
|
1536
|
-
<span class="default">
|
1537
|
-
|
1538
|
-
<span class="na">N/A</span>
|
1539
|
-
|
1540
|
-
</span>
|
1541
|
-
—
|
1542
|
-
Query string to filter results
|
1543
|
-
|
1544
|
-
|
1545
|
-
</tr>
|
1546
|
-
|
1547
|
-
</ul>
|
1548
|
-
|
1549
|
-
<h3>Returns:</h3>
|
1550
|
-
<ul class="return">
|
1551
|
-
|
1552
|
-
<li>
|
1553
|
-
|
1554
|
-
<span class='type'>(<tt><a href="Stats.html" title="Topsy::Stats">Topsy::Stats</a></tt>)</span>
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
</li>
|
1560
|
-
|
1561
|
-
</ul>
|
1562
|
-
|
1563
|
-
</div><table class="source_code">
|
1564
|
-
<tr>
|
1565
|
-
<td>
|
1566
|
-
<pre class="lines">
|
1567
|
-
|
1568
|
-
|
1569
|
-
113
|
1570
|
-
114
|
1571
|
-
115
|
1572
|
-
116
|
1573
|
-
117
|
1574
|
-
118</pre>
|
1575
|
-
</td>
|
1576
|
-
<td>
|
1577
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 113</span>
|
1578
|
-
|
1579
|
-
<span class='def def kw'>def</span> <span class='stats identifier id'>stats</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
1580
|
-
<span class='query identifier id'>query</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span>
|
1581
|
-
<span class='query identifier id'>query</span><span class='dot token'>.</span><span class='merge! fid id'>merge!</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>
|
1582
|
-
<span class='response identifier id'>response</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/stats.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='query identifier id'>query</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1583
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Stats constant id'>Stats</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='response identifier id'>response</span><span class='rparen token'>)</span>
|
1584
|
-
<span class='end end kw'>end</span>
|
1585
|
-
</pre>
|
1586
|
-
</td>
|
1587
|
-
</tr>
|
1588
|
-
</table>
|
1589
|
-
</div>
|
1590
|
-
|
1591
|
-
<div class="method_details ">
|
1592
|
-
<p class="signature " id="tags-instance_method">
|
1593
|
-
|
1594
|
-
- (<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>) <strong>tags</strong>(url, options = {})
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
</p><div class="docstring">
|
1599
|
-
<div class="discussion">
|
1600
|
-
<p>
|
1601
|
-
Returns list of tags for a URL.
|
1602
|
-
</p>
|
1603
|
-
|
1604
|
-
|
1605
|
-
</div>
|
1606
|
-
</div>
|
1607
|
-
<div class="tags">
|
1608
|
-
<h3>Parameters:</h3>
|
1609
|
-
<ul class="param">
|
1610
|
-
|
1611
|
-
<li>
|
1612
|
-
|
1613
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1614
|
-
|
1615
|
-
|
1616
|
-
<span class='name'>url</span>
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
—
|
1621
|
-
|
1622
|
-
the search query string
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
</li>
|
1627
|
-
|
1628
|
-
<li>
|
1629
|
-
|
1630
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
1631
|
-
|
1632
|
-
|
1633
|
-
<span class='name'>options</span>
|
1634
|
-
|
1635
|
-
|
1636
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1637
|
-
|
1638
|
-
|
1639
|
-
—
|
1640
|
-
|
1641
|
-
method options
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
</li>
|
1646
|
-
|
1647
|
-
</ul>
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
1655
|
-
<ul class="option">
|
1656
|
-
|
1657
|
-
<li>
|
1658
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1659
|
-
<span class="name">:page</span>
|
1660
|
-
<span class="default">
|
1661
|
-
|
1662
|
-
<span class="na">N/A</span>
|
1663
|
-
|
1664
|
-
</span>
|
1665
|
-
—
|
1666
|
-
page number of the result set. (default: 1, max: 10)
|
1667
|
-
|
1668
|
-
|
1669
|
-
</tr>
|
1670
|
-
|
1671
|
-
<li>
|
1672
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1673
|
-
<span class="name">:perpage</span>
|
1674
|
-
<span class="default">
|
1675
|
-
|
1676
|
-
<span class="na">N/A</span>
|
1677
|
-
|
1678
|
-
</span>
|
1679
|
-
—
|
1680
|
-
limit number of results per page. (default: 10, max: 50)
|
1681
|
-
|
1682
|
-
|
1683
|
-
</tr>
|
1684
|
-
|
1685
|
-
</ul>
|
1686
|
-
|
1687
|
-
<h3>Returns:</h3>
|
1688
|
-
<ul class="return">
|
1689
|
-
|
1690
|
-
<li>
|
1691
|
-
|
1692
|
-
<span class='type'>(<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>)</span>
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
</li>
|
1698
|
-
|
1699
|
-
</ul>
|
1700
|
-
|
1701
|
-
</div><table class="source_code">
|
1702
|
-
<tr>
|
1703
|
-
<td>
|
1704
|
-
<pre class="lines">
|
1705
|
-
|
1706
|
-
|
1707
|
-
127
|
1708
|
-
128
|
1709
|
-
129
|
1710
|
-
130</pre>
|
1711
|
-
</td>
|
1712
|
-
<td>
|
1713
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 127</span>
|
1714
|
-
|
1715
|
-
<span class='def def kw'>def</span> <span class='tags identifier id'>tags</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
1716
|
-
<span class='response identifier id'>response</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/tags.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1717
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Page constant id'>Page</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='response identifier id'>response</span><span class='comma token'>,</span><span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Tag constant id'>Tag</span><span class='rparen token'>)</span>
|
1718
|
-
<span class='end end kw'>end</span>
|
1719
|
-
</pre>
|
1720
|
-
</td>
|
1721
|
-
</tr>
|
1722
|
-
</table>
|
1723
|
-
</div>
|
1724
|
-
|
1725
|
-
<div class="method_details ">
|
1726
|
-
<p class="signature " id="trackbacks-instance_method">
|
1727
|
-
|
1728
|
-
- (<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>) <strong>trackbacks</strong>(url, options = {})
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
</p><div class="docstring">
|
1733
|
-
<div class="discussion">
|
1734
|
-
<p>
|
1735
|
-
Returns list of tweets (trackbacks) that mention the query URL, most recent
|
1736
|
-
first.
|
1737
|
-
</p>
|
1738
|
-
|
1739
|
-
|
1740
|
-
</div>
|
1741
|
-
</div>
|
1742
|
-
<div class="tags">
|
1743
|
-
<h3>Parameters:</h3>
|
1744
|
-
<ul class="param">
|
1745
|
-
|
1746
|
-
<li>
|
1747
|
-
|
1748
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1749
|
-
|
1750
|
-
|
1751
|
-
<span class='name'>url</span>
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
—
|
1756
|
-
|
1757
|
-
URL string for the author.
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
</li>
|
1762
|
-
|
1763
|
-
<li>
|
1764
|
-
|
1765
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
1766
|
-
|
1767
|
-
|
1768
|
-
<span class='name'>options</span>
|
1769
|
-
|
1770
|
-
|
1771
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1772
|
-
|
1773
|
-
|
1774
|
-
—
|
1775
|
-
|
1776
|
-
method options
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
</li>
|
1781
|
-
|
1782
|
-
</ul>
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
1790
|
-
<ul class="option">
|
1791
|
-
|
1792
|
-
<li>
|
1793
|
-
<span class="type">(<tt>String</tt>)</span>
|
1794
|
-
<span class="name">:contains</span>
|
1795
|
-
<span class="default">
|
1796
|
-
|
1797
|
-
<span class="na">N/A</span>
|
1798
|
-
|
1799
|
-
</span>
|
1800
|
-
—
|
1801
|
-
Query string to filter results
|
1802
|
-
|
1803
|
-
|
1804
|
-
</tr>
|
1805
|
-
|
1806
|
-
<li>
|
1807
|
-
<span class="type">(<tt>Boolean</tt>)</span>
|
1808
|
-
<span class="name">:infonly</span>
|
1809
|
-
<span class="default">
|
1810
|
-
|
1811
|
-
<span class="na">N/A</span>
|
1812
|
-
|
1813
|
-
</span>
|
1814
|
-
—
|
1815
|
-
filters trackbacks to influential only (default 0)
|
1816
|
-
|
1817
|
-
|
1818
|
-
</tr>
|
1819
|
-
|
1820
|
-
<li>
|
1821
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1822
|
-
<span class="name">:page</span>
|
1823
|
-
<span class="default">
|
1824
|
-
|
1825
|
-
<span class="na">N/A</span>
|
1826
|
-
|
1827
|
-
</span>
|
1828
|
-
—
|
1829
|
-
page number of the result set. (default: 1, max: 10)
|
1830
|
-
|
1831
|
-
|
1832
|
-
</tr>
|
1833
|
-
|
1834
|
-
<li>
|
1835
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1836
|
-
<span class="name">:perpage</span>
|
1837
|
-
<span class="default">
|
1838
|
-
|
1839
|
-
<span class="na">N/A</span>
|
1840
|
-
|
1841
|
-
</span>
|
1842
|
-
—
|
1843
|
-
limit number of results per page. (default: 10, max: 50)
|
1844
|
-
|
1845
|
-
|
1846
|
-
</tr>
|
1847
|
-
|
1848
|
-
</ul>
|
1849
|
-
|
1850
|
-
<h3>Returns:</h3>
|
1851
|
-
<ul class="return">
|
1852
|
-
|
1853
|
-
<li>
|
1854
|
-
|
1855
|
-
<span class='type'>(<tt><a href="Page.html" title="Topsy::Page">Topsy::Page</a></tt>)</span>
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
</li>
|
1861
|
-
|
1862
|
-
</ul>
|
1863
|
-
|
1864
|
-
</div><table class="source_code">
|
1865
|
-
<tr>
|
1866
|
-
<td>
|
1867
|
-
<pre class="lines">
|
1868
|
-
|
1869
|
-
|
1870
|
-
141
|
1871
|
-
142
|
1872
|
-
143
|
1873
|
-
144
|
1874
|
-
145
|
1875
|
-
146
|
1876
|
-
147</pre>
|
1877
|
-
</td>
|
1878
|
-
<td>
|
1879
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 141</span>
|
1880
|
-
|
1881
|
-
<span class='def def kw'>def</span> <span class='trackbacks identifier id'>trackbacks</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
1882
|
-
<span class='results identifier id'>results</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/trackbacks.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span><span class='dot token'>.</span><span class='merge identifier id'>merge</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1883
|
-
<span class='results identifier id'>results</span><span class='dot token'>.</span><span class='list identifier id'>list</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='trackback identifier id'>trackback</span><span class='bitor op'>|</span>
|
1884
|
-
<span class='trackback identifier id'>trackback</span><span class='dot token'>.</span><span class='date identifier id'>date</span> <span class='assign token'>=</span> <span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='at identifier id'>at</span><span class='lparen token'>(</span><span class='trackback identifier id'>trackback</span><span class='dot token'>.</span><span class='date identifier id'>date</span><span class='rparen token'>)</span>
|
1885
|
-
<span class='end end kw'>end</span>
|
1886
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Page constant id'>Page</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='results identifier id'>results</span><span class='comma token'>,</span><span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Tweet constant id'>Tweet</span><span class='rparen token'>)</span>
|
1887
|
-
<span class='end end kw'>end</span>
|
1888
|
-
</pre>
|
1889
|
-
</td>
|
1890
|
-
</tr>
|
1891
|
-
</table>
|
1892
|
-
</div>
|
1893
|
-
|
1894
|
-
<div class="method_details ">
|
1895
|
-
<p class="signature " id="trending-instance_method">
|
1896
|
-
|
1897
|
-
- (<tt>Hashie::Mash</tt>) <strong>trending</strong>(options = {})
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
</p><div class="docstring">
|
1902
|
-
<div class="discussion">
|
1903
|
-
<p>
|
1904
|
-
Returns list of trending terms
|
1905
|
-
</p>
|
1906
|
-
|
1907
|
-
|
1908
|
-
</div>
|
1909
|
-
</div>
|
1910
|
-
<div class="tags">
|
1911
|
-
<h3>Parameters:</h3>
|
1912
|
-
<ul class="param">
|
1913
|
-
|
1914
|
-
<li>
|
1915
|
-
|
1916
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
1917
|
-
|
1918
|
-
|
1919
|
-
<span class='name'>options</span>
|
1920
|
-
|
1921
|
-
|
1922
|
-
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
1923
|
-
|
1924
|
-
|
1925
|
-
—
|
1926
|
-
|
1927
|
-
method options
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
</li>
|
1932
|
-
|
1933
|
-
</ul>
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
<h3>Options Hash (<tt>options</tt>):</h3>
|
1939
|
-
<ul class="option">
|
1940
|
-
|
1941
|
-
<li>
|
1942
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1943
|
-
<span class="name">:page</span>
|
1944
|
-
<span class="default">
|
1945
|
-
|
1946
|
-
<span class="na">N/A</span>
|
1947
|
-
|
1948
|
-
</span>
|
1949
|
-
—
|
1950
|
-
page number of the result set. (default: 1, max: 10)
|
1951
|
-
|
1952
|
-
|
1953
|
-
</tr>
|
1954
|
-
|
1955
|
-
<li>
|
1956
|
-
<span class="type">(<tt>Integer</tt>)</span>
|
1957
|
-
<span class="name">:perpage</span>
|
1958
|
-
<span class="default">
|
1959
|
-
|
1960
|
-
<span class="na">N/A</span>
|
1961
|
-
|
1962
|
-
</span>
|
1963
|
-
—
|
1964
|
-
limit number of results per page. (default: 10, max: 50)
|
1965
|
-
|
1966
|
-
|
1967
|
-
</tr>
|
1968
|
-
|
1969
|
-
</ul>
|
1970
|
-
|
1971
|
-
<h3>Returns:</h3>
|
1972
|
-
<ul class="return">
|
1973
|
-
|
1974
|
-
<li>
|
1975
|
-
|
1976
|
-
<span class='type'>(<tt>Hashie::Mash</tt>)</span>
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
</li>
|
1982
|
-
|
1983
|
-
</ul>
|
1984
|
-
|
1985
|
-
</div><table class="source_code">
|
1986
|
-
<tr>
|
1987
|
-
<td>
|
1988
|
-
<pre class="lines">
|
1989
|
-
|
1990
|
-
|
1991
|
-
155
|
1992
|
-
156
|
1993
|
-
157
|
1994
|
-
158</pre>
|
1995
|
-
</td>
|
1996
|
-
<td>
|
1997
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 155</span>
|
1998
|
-
|
1999
|
-
<span class='def def kw'>def</span> <span class='trending identifier id'>trending</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
|
2000
|
-
<span class='response identifier id'>response</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/trending.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='options identifier id'>options</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
2001
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Page constant id'>Page</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='response identifier id'>response</span><span class='comma token'>,</span><span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='Trend constant id'>Trend</span><span class='rparen token'>)</span>
|
2002
|
-
<span class='end end kw'>end</span>
|
2003
|
-
</pre>
|
2004
|
-
</td>
|
2005
|
-
</tr>
|
2006
|
-
</table>
|
2007
|
-
</div>
|
2008
|
-
|
2009
|
-
<div class="method_details ">
|
2010
|
-
<p class="signature " id="url_info-instance_method">
|
2011
|
-
|
2012
|
-
- (<tt><a href="UrlInfo.html" title="Topsy::UrlInfo">Topsy::UrlInfo</a></tt>) <strong>url_info</strong>(url)
|
2013
|
-
|
2014
|
-
|
2015
|
-
|
2016
|
-
</p><div class="docstring">
|
2017
|
-
<div class="discussion">
|
2018
|
-
<p>
|
2019
|
-
Returns info about a URL
|
2020
|
-
</p>
|
2021
|
-
|
2022
|
-
|
2023
|
-
</div>
|
2024
|
-
</div>
|
2025
|
-
<div class="tags">
|
2026
|
-
<h3>Parameters:</h3>
|
2027
|
-
<ul class="param">
|
2028
|
-
|
2029
|
-
<li>
|
2030
|
-
|
2031
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2032
|
-
|
2033
|
-
|
2034
|
-
<span class='name'>url</span>
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
—
|
2039
|
-
|
2040
|
-
the url to look up
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
</li>
|
2045
|
-
|
2046
|
-
</ul>
|
2047
|
-
<h3>Returns:</h3>
|
2048
|
-
<ul class="return">
|
2049
|
-
|
2050
|
-
<li>
|
2051
|
-
|
2052
|
-
<span class='type'>(<tt><a href="UrlInfo.html" title="Topsy::UrlInfo">Topsy::UrlInfo</a></tt>)</span>
|
2053
|
-
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2057
|
-
</li>
|
2058
|
-
|
2059
|
-
</ul>
|
2060
|
-
|
2061
|
-
</div><table class="source_code">
|
2062
|
-
<tr>
|
2063
|
-
<td>
|
2064
|
-
<pre class="lines">
|
2065
|
-
|
2066
|
-
|
2067
|
-
164
|
2068
|
-
165
|
2069
|
-
166
|
2070
|
-
167</pre>
|
2071
|
-
</td>
|
2072
|
-
<td>
|
2073
|
-
<pre class="code"><span class="info file"># File 'lib/topsy/client.rb', line 164</span>
|
2074
|
-
|
2075
|
-
<span class='def def kw'>def</span> <span class='url_info identifier id'>url_info</span><span class='lparen token'>(</span><span class='url identifier id'>url</span><span class='rparen token'>)</span>
|
2076
|
-
<span class='response identifier id'>response</span> <span class='assign token'>=</span> <span class='handle_response identifier id'>handle_response</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='class identifier id'>class</span><span class='dot token'>.</span><span class='get identifier id'>get</span><span class='lparen token'>(</span><span class='string val'>"/urlinfo.json"</span><span class='comma token'>,</span> <span class='symbol val'>:query</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:url</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='url identifier id'>url</span><span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
2077
|
-
<span class='Topsy constant id'>Topsy</span><span class='colon2 op'>::</span><span class='UrlInfo constant id'>UrlInfo</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='response identifier id'>response</span><span class='rparen token'>)</span>
|
2078
|
-
<span class='end end kw'>end</span>
|
2079
|
-
</pre>
|
2080
|
-
</td>
|
2081
|
-
</tr>
|
2082
|
-
</table>
|
2083
|
-
</div>
|
2084
|
-
|
2085
|
-
</div>
|
2086
|
-
|
2087
|
-
</div>
|
2088
|
-
|
2089
|
-
<div id="footer">
|
2090
|
-
Generated on Wed Jan 6 10:31:57 2010 by
|
2091
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
2092
|
-
0.5.2 (ruby-1.8.6).
|
2093
|
-
</div>
|
2094
|
-
|
2095
|
-
</body>
|
2096
|
-
</html>
|