-
Notifications
You must be signed in to change notification settings - Fork 0
/
Crawler.Client.html
222 lines (203 loc) · 8.35 KB
/
Crawler.Client.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.19.3">
<title>Crawler.Client — Belethor's General Mods v0.0.1-2</title>
<link rel="stylesheet" href="dist/html-399e30b9b028e3059575.css" />
<script src="dist/sidebar_items-668dd872e9.js"></script>
<script async src="dist/html-399e30b9b028e3059575.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="https://bgm.tetrarch.co" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
Belethor's General Mods </h1>
<h2 class="sidebar-projectVersion">
v0.0.1-2
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">GUIDES</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">Belethor's General Mods v0.0.1-2</small>
Crawler.Client <small>behaviour</small>
<a href="https://github.com/Belethors-General-Mods/belethor/blob/master/apps/crawler/lib/crawler/client_behaviour.ex#L1" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="moduledoc">
<p>This module describes client behaviour to be used by <a href="Crawler.TaskManager.html#search/4"><code class="inline">Crawler.TaskManager.search/4</code></a>.</p>
<p>The only function to be implemented is the <code class="inline">search/1</code> function.</p>
</section>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-types summary">
<h2>
<a href="#types">Types</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#t:args/0">args()</a>
</div>
<div class="summary-synopsis"><p>TODO this should be done with the first real impls of clients</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#t:result/0">result()</a>
</div>
</div>
</div>
<div class="summary-callbacks summary">
<h2>
<a href="#callbacks">Callbacks</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#c:search/1">search(args)</a>
</div>
<div class="summary-synopsis"><p>This function is meant to query an provider.
In the usual version of an http based api from the provider, you need to do:
Query the provider server, with the argumens of in the <code class="inline">query()</code>.
Then parse the data into <code class="inline">[result()]</code>.
If all this worked as expected return {:ok, [result()]}.
If not return {:error, reason :: term()}</p>
</div>
</div>
</div>
</section>
<section id="types" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#types">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Types </h1>
<div class="types-list">
<section class="detail" id="t:args/0">
<div class="detail-header">
<a href="#t:args/0" class="detail-link" title="Link to this type">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this type</span>
</a>
<h1 class="signature">args()</span>
<a href="https://github.com/Belethors-General-Mods/belethor/blob/master/apps/crawler/lib/crawler/client_behaviour.ex#L10" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>args() :: [<a href="https://hexdocs.pm/elixir/typespecs.html#basic-types">any</a>()]</pre>
</div>
</div>
<section class="docstring">
<p>TODO this should be done with the first real impls of clients</p>
</section>
</section>
<section class="detail" id="t:result/0">
<div class="detail-header">
<a href="#t:result/0" class="detail-link" title="Link to this type">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this type</span>
</a>
<h1 class="signature">result()</span>
<a href="https://github.com/Belethors-General-Mods/belethor/blob/master/apps/crawler/lib/crawler/client_behaviour.ex#L12" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>result() :: {:ok, [<a href="Common.Struct.Mod.html#t:t/0">Common.Struct.Mod.t</a>()]} | {:error, <a href="https://hexdocs.pm/elixir/typespecs.html#built-in-types">term</a>()}</pre>
</div>
</div>
<section class="docstring">
</section>
</section>
</div>
</section>
<section id="callbacks" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#callbacks">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Callbacks </h1>
<div class="callbacks-list">
<section class="detail" id="c:search/1">
<div class="detail-header">
<a href="#c:search/1" class="detail-link" title="Link to this callback">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this callback</span>
</a>
<h1 class="signature">search(args)</span>
<a href="https://github.com/Belethors-General-Mods/belethor/blob/master/apps/crawler/lib/crawler/client_behaviour.ex#L22" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
<div class="specs">
<pre>search(<a href="#t:args/0">args</a>()) :: <a href="#t:result/0">result</a>()</pre>
</div>
</div>
<section class="docstring">
<p>This function is meant to query an provider.
In the usual version of an http based api from the provider, you need to do:
Query the provider server, with the argumens of in the <code class="inline">query()</code>.
Then parse the data into <code class="inline">[result()]</code>.
If all this worked as expected return {:ok, [result()]}.
If not return {:error, reason :: term()}.</p>
</section>
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" target="_blank" rel="help noopener">ExDoc</a> (v0.19.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" rel="noopener" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
</body>
</html>