bizratr 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,283 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: BizRatr::Connector</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../index.html">Home</a>
29
- <a href="../index.html#classes">Classes</a>
30
- <a href="../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../lib/bizratr/connector_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/bizratr/connector.rb">lib/bizratr/connector.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link">Object</p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
- <div id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
- <ul class="link-list">
71
-
72
- <li><a href="#method-i-checkins">#checkins</a></li>
73
-
74
- <li><a href="#method-i-search_location">#search_location</a></li>
75
-
76
- <li><a href="#method-i-search_similar">#search_similar</a></li>
77
-
78
- </ul>
79
- </div>
80
-
81
-
82
- <!-- Included Modules -->
83
-
84
- </div>
85
-
86
- <div id="project-metadata">
87
-
88
-
89
- <div id="fileindex-section" class="section project-section">
90
- <h3 class="section-header">Files</h3>
91
- <ul>
92
-
93
- <li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
94
-
95
- </ul>
96
- </div>
97
-
98
-
99
- <div id="classindex-section" class="section project-section">
100
- <h3 class="section-header">Class Index
101
- <span class="search-toggle"><img src="../images/find.png"
102
- height="16" width="16" alt="[+]"
103
- title="show/hide quicksearch" /></span></h3>
104
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
105
- <fieldset>
106
- <legend>Quicksearch</legend>
107
- <input type="text" name="quicksearch" value=""
108
- class="quicksearch-field" />
109
- </fieldset>
110
- </form>
111
-
112
- <ul class="link-list">
113
-
114
- <li><a href="../BizRatr.html">BizRatr</a></li>
115
-
116
- <li><a href="../BizRatr/Business.html">BizRatr::Business</a></li>
117
-
118
- <li><a href="../BizRatr/Connector.html">BizRatr::Connector</a></li>
119
-
120
- <li><a href="../BizRatr/Finder.html">BizRatr::Finder</a></li>
121
-
122
- <li><a href="../BizRatr/FourSquareConnector.html">BizRatr::FourSquareConnector</a></li>
123
-
124
- <li><a href="../BizRatr/GooglePlacesConnector.html">BizRatr::GooglePlacesConnector</a></li>
125
-
126
- <li><a href="../BizRatr/YelpConnector.html">BizRatr::YelpConnector</a></li>
127
-
128
- </ul>
129
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
130
- </div>
131
-
132
-
133
- </div>
134
- </div>
135
-
136
- <div id="documentation">
137
- <h1 class="class">BizRatr::Connector</h1>
138
-
139
- <div id="description">
140
-
141
- </div>
142
-
143
- <!-- Constants -->
144
-
145
-
146
- <!-- Attributes -->
147
-
148
-
149
- <!-- Methods -->
150
-
151
- <div id="public-instance-method-details" class="method-section section">
152
- <h3 class="section-header">Public Instance Methods</h3>
153
-
154
-
155
- <div id="checkins-method" class="method-detail ">
156
- <a name="method-i-checkins"></a>
157
-
158
- <div class="method-heading">
159
-
160
- <span class="method-name">checkins</span><span
161
- class="method-args">(business)</span>
162
- <span class="method-click-advice">click to toggle source</span>
163
-
164
- </div>
165
-
166
- <div class="method-description">
167
-
168
- <p>
169
- <a
170
- href="https://developer.foursquare.com/docs/responses/venuestats">developer.foursquare.com/docs/responses/venuestats</a>
171
- </p>
172
-
173
-
174
-
175
- <div class="method-source-code"
176
- id="checkins-source">
177
- <pre>
178
- <span class="ruby-comment cmt"># File lib/bizratr/connector.rb, line 14</span>
179
- 14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">checkins</span>(<span class="ruby-identifier">business</span>)
180
- 15: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Not implemented&quot;</span>
181
- 16: <span class="ruby-keyword kw">end</span></pre>
182
- </div>
183
-
184
- </div>
185
-
186
-
187
-
188
-
189
- </div>
190
-
191
-
192
- <div id="search-location-method" class="method-detail ">
193
- <a name="method-i-search_location"></a>
194
-
195
- <div class="method-heading">
196
-
197
- <span class="method-name">search_location</span><span
198
- class="method-args">(ll, query)</span>
199
- <span class="method-click-advice">click to toggle source</span>
200
-
201
- </div>
202
-
203
- <div class="method-description">
204
-
205
-
206
-
207
-
208
-
209
- <div class="method-source-code"
210
- id="search-location-source">
211
- <pre>
212
- <span class="ruby-comment cmt"># File lib/bizratr/connector.rb, line 18</span>
213
- 18: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_location</span>(<span class="ruby-identifier">ll</span>, <span class="ruby-identifier">query</span>)
214
- 19: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Not implemented&quot;</span>
215
- 20: <span class="ruby-keyword kw">end</span></pre>
216
- </div>
217
-
218
- </div>
219
-
220
-
221
-
222
-
223
- </div>
224
-
225
-
226
- <div id="search-similar-method" class="method-detail ">
227
- <a name="method-i-search_similar"></a>
228
-
229
- <div class="method-heading">
230
-
231
- <span class="method-name">search_similar</span><span
232
- class="method-args">(business)</span>
233
- <span class="method-click-advice">click to toggle source</span>
234
-
235
- </div>
236
-
237
- <div class="method-description">
238
-
239
- <p>
240
- <a
241
- href="https://api.foursquare.com/v2/venues/VENUE_ID/similar">api.foursquare.com/v2/venues/VENUE_ID/similar</a>
242
- </p>
243
-
244
-
245
-
246
- <div class="method-source-code"
247
- id="search-similar-source">
248
- <pre>
249
- <span class="ruby-comment cmt"># File lib/bizratr/connector.rb, line 9</span>
250
- 9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_similar</span>(<span class="ruby-identifier">business</span>)
251
- 10: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Not implemented&quot;</span>
252
- 11: <span class="ruby-keyword kw">end</span></pre>
253
- </div>
254
-
255
- </div>
256
-
257
-
258
-
259
-
260
- </div>
261
-
262
-
263
- </div>
264
-
265
-
266
- </div>
267
-
268
-
269
- <div id="rdoc-debugging-section-dump" class="debugging-section">
270
-
271
- <p>Disabled; run with --debug to generate this.</p>
272
-
273
- </div>
274
-
275
- <div id="validator-badges">
276
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
277
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
278
- Rdoc Generator</a> 1.1.6</small>.</p>
279
- </div>
280
-
281
- </body>
282
- </html>
283
-
@@ -1,348 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Class: BizRatr::Finder</title>
9
-
10
- <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="class">
23
-
24
- <div id="metadata">
25
- <div id="home-metadata">
26
- <div id="home-section" class="section">
27
- <h3 class="section-header">
28
- <a href="../index.html">Home</a>
29
- <a href="../index.html#classes">Classes</a>
30
- <a href="../index.html#methods">Methods</a>
31
- </h3>
32
- </div>
33
- </div>
34
-
35
- <div id="file-metadata">
36
- <div id="file-list-section" class="section">
37
- <h3 class="section-header">In Files</h3>
38
- <div class="section-body">
39
- <ul>
40
-
41
- <li><a href="../lib/bizratr/connector_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
- class="thickbox" title="lib/bizratr/connector.rb">lib/bizratr/connector.rb</a></li>
43
-
44
- </ul>
45
- </div>
46
- </div>
47
-
48
-
49
- </div>
50
-
51
- <div id="class-metadata">
52
-
53
- <!-- Parent Class -->
54
-
55
- <div id="parent-class-section" class="section">
56
- <h3 class="section-header">Parent</h3>
57
-
58
- <p class="link">Object</p>
59
-
60
- </div>
61
-
62
-
63
- <!-- Namespace Contents -->
64
-
65
-
66
- <!-- Method Quickref -->
67
-
68
- <div id="method-list-section" class="section">
69
- <h3 class="section-header">Methods</h3>
70
- <ul class="link-list">
71
-
72
- <li><a href="#method-c-new">::new</a></li>
73
-
74
- <li><a href="#method-i-merge">#merge</a></li>
75
-
76
- <li><a href="#method-i-merge_lists">#merge_lists</a></li>
77
-
78
- <li><a href="#method-i-search_location">#search_location</a></li>
79
-
80
- </ul>
81
- </div>
82
-
83
-
84
- <!-- Included Modules -->
85
-
86
- </div>
87
-
88
- <div id="project-metadata">
89
-
90
-
91
- <div id="fileindex-section" class="section project-section">
92
- <h3 class="section-header">Files</h3>
93
- <ul>
94
-
95
- <li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
96
-
97
- </ul>
98
- </div>
99
-
100
-
101
- <div id="classindex-section" class="section project-section">
102
- <h3 class="section-header">Class Index
103
- <span class="search-toggle"><img src="../images/find.png"
104
- height="16" width="16" alt="[+]"
105
- title="show/hide quicksearch" /></span></h3>
106
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
107
- <fieldset>
108
- <legend>Quicksearch</legend>
109
- <input type="text" name="quicksearch" value=""
110
- class="quicksearch-field" />
111
- </fieldset>
112
- </form>
113
-
114
- <ul class="link-list">
115
-
116
- <li><a href="../BizRatr.html">BizRatr</a></li>
117
-
118
- <li><a href="../BizRatr/Business.html">BizRatr::Business</a></li>
119
-
120
- <li><a href="../BizRatr/Connector.html">BizRatr::Connector</a></li>
121
-
122
- <li><a href="../BizRatr/Finder.html">BizRatr::Finder</a></li>
123
-
124
- <li><a href="../BizRatr/FourSquareConnector.html">BizRatr::FourSquareConnector</a></li>
125
-
126
- <li><a href="../BizRatr/GooglePlacesConnector.html">BizRatr::GooglePlacesConnector</a></li>
127
-
128
- <li><a href="../BizRatr/YelpConnector.html">BizRatr::YelpConnector</a></li>
129
-
130
- </ul>
131
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
132
- </div>
133
-
134
-
135
- </div>
136
- </div>
137
-
138
- <div id="documentation">
139
- <h1 class="class">BizRatr::Finder</h1>
140
-
141
- <div id="description">
142
-
143
- </div>
144
-
145
- <!-- Constants -->
146
-
147
-
148
- <!-- Attributes -->
149
-
150
-
151
- <!-- Methods -->
152
-
153
- <div id="public-class-method-details" class="method-section section">
154
- <h3 class="section-header">Public Class Methods</h3>
155
-
156
-
157
- <div id="new-method" class="method-detail ">
158
- <a name="method-c-new"></a>
159
-
160
- <div class="method-heading">
161
-
162
- <span class="method-name">new</span><span
163
- class="method-args">(config)</span>
164
- <span class="method-click-advice">click to toggle source</span>
165
-
166
- </div>
167
-
168
- <div class="method-description">
169
-
170
-
171
-
172
-
173
-
174
- <div class="method-source-code"
175
- id="new-source">
176
- <pre>
177
- <span class="ruby-comment cmt"># File lib/bizratr/connector.rb, line 103</span>
178
- 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">config</span>)
179
- 104: <span class="ruby-ivar">@connectors</span> = <span class="ruby-identifier">config</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span><span class="ruby-operator">|</span>
180
- 105: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">key</span>
181
- 106: <span class="ruby-keyword kw">when</span> <span class="ruby-value">:foursquare</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">FourSquareConnector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
182
- 107: <span class="ruby-keyword kw">when</span> <span class="ruby-value">:yelp</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">YelpConnector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
183
- 108: <span class="ruby-keyword kw">when</span> <span class="ruby-value">:google_places</span> <span class="ruby-keyword kw">then</span> <span class="ruby-constant">GooglePlacesConnector</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">value</span>)
184
- 109: <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;No such connector found: #{key}&quot;</span>
185
- 110: <span class="ruby-keyword kw">end</span>
186
- 111: }
187
- 112: <span class="ruby-keyword kw">end</span></pre>
188
- </div>
189
-
190
- </div>
191
-
192
-
193
-
194
-
195
- </div>
196
-
197
-
198
- </div>
199
-
200
- <div id="public-instance-method-details" class="method-section section">
201
- <h3 class="section-header">Public Instance Methods</h3>
202
-
203
-
204
- <div id="search-location-method" class="method-detail ">
205
- <a name="method-i-search_location"></a>
206
-
207
- <div class="method-heading">
208
-
209
- <span class="method-name">search_location</span><span
210
- class="method-args">(ll, query)</span>
211
- <span class="method-click-advice">click to toggle source</span>
212
-
213
- </div>
214
-
215
- <div class="method-description">
216
-
217
- <p>
218
- Search for a business (or business category) near lat/lon coordinates. The
219
- ll parameter should be a string of the form &#8220;lat,lon&#8221;.
220
- </p>
221
-
222
-
223
-
224
- <div class="method-source-code"
225
- id="search-location-source">
226
- <pre>
227
- <span class="ruby-comment cmt"># File lib/bizratr/connector.rb, line 116</span>
228
- 116: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">search_location</span>(<span class="ruby-identifier">ll</span>, <span class="ruby-identifier">query</span>)
229
- 117: <span class="ruby-identifier">merge</span> <span class="ruby-ivar">@connectors</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
230
- 118: <span class="ruby-identifier">c</span>.<span class="ruby-identifier">search_location</span>(<span class="ruby-identifier">ll</span>, <span class="ruby-identifier">query</span>)
231
- 119: }
232
- 120: <span class="ruby-keyword kw">end</span></pre>
233
- </div>
234
-
235
- </div>
236
-
237
-
238
-
239
-
240
- </div>
241
-
242
-
243
- </div>
244
-
245
- <div id="private-instance-method-details" class="method-section section">
246
- <h3 class="section-header">Private Instance Methods</h3>
247
-
248
-
249
- <div id="merge-method" class="method-detail ">
250
- <a name="method-i-merge"></a>
251
-
252
- <div class="method-heading">
253
-
254
- <span class="method-name">merge</span><span
255
- class="method-args">(lists)</span>
256
- <span class="method-click-advice">click to toggle source</span>
257
-
258
- </div>
259
-
260
- <div class="method-description">
261
-
262
-
263
-
264
-
265
-
266
- <div class="method-source-code"
267
- id="merge-source">
268
- <pre>
269
- <span class="ruby-comment cmt"># File lib/bizratr/connector.rb, line 123</span>
270
- 123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge</span>(<span class="ruby-identifier">lists</span>)
271
- 124: <span class="ruby-identifier">lists</span>.<span class="ruby-identifier">inject</span>([]) { <span class="ruby-operator">|</span><span class="ruby-identifier">o</span>,<span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">merge_lists</span>(<span class="ruby-identifier">o</span>, <span class="ruby-identifier">t</span>) }
272
- 125: <span class="ruby-keyword kw">end</span></pre>
273
- </div>
274
-
275
- </div>
276
-
277
-
278
-
279
-
280
- </div>
281
-
282
-
283
- <div id="merge-lists-method" class="method-detail ">
284
- <a name="method-i-merge_lists"></a>
285
-
286
- <div class="method-heading">
287
-
288
- <span class="method-name">merge_lists</span><span
289
- class="method-args">(one, two)</span>
290
- <span class="method-click-advice">click to toggle source</span>
291
-
292
- </div>
293
-
294
- <div class="method-description">
295
-
296
-
297
-
298
-
299
-
300
- <div class="method-source-code"
301
- id="merge-lists-source">
302
- <pre>
303
- <span class="ruby-comment cmt"># File lib/bizratr/connector.rb, line 127</span>
304
- 127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">merge_lists</span>(<span class="ruby-identifier">one</span>, <span class="ruby-identifier">two</span>)
305
- 128: <span class="ruby-identifier">one</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">first</span><span class="ruby-operator">|</span>
306
- 129: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">first</span>
307
- 130: <span class="ruby-identifier">two</span>.<span class="ruby-identifier">map!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">second</span><span class="ruby-operator">|</span>
308
- 131: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">first</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">second</span>
309
- 132: <span class="ruby-identifier">result</span> = <span class="ruby-identifier">first</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">second</span>)
310
- 133: <span class="ruby-keyword kw">nil</span>
311
- 134: <span class="ruby-keyword kw">else</span>
312
- 135: <span class="ruby-identifier">second</span>
313
- 136: <span class="ruby-keyword kw">end</span>
314
- 137: }
315
- 138: <span class="ruby-identifier">result</span>
316
- 139: } <span class="ruby-operator">+</span> <span class="ruby-identifier">two</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">nil?</span> }
317
- 140: <span class="ruby-keyword kw">end</span></pre>
318
- </div>
319
-
320
- </div>
321
-
322
-
323
-
324
-
325
- </div>
326
-
327
-
328
- </div>
329
-
330
-
331
- </div>
332
-
333
-
334
- <div id="rdoc-debugging-section-dump" class="debugging-section">
335
-
336
- <p>Disabled; run with --debug to generate this.</p>
337
-
338
- </div>
339
-
340
- <div id="validator-badges">
341
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
342
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
343
- Rdoc Generator</a> 1.1.6</small>.</p>
344
- </div>
345
-
346
- </body>
347
- </html>
348
-