This file is indexed.

/usr/share/doc/liblastfm-ocaml-dev/html/Lastfm.Audioscrobbler.html is in liblastfm-ocaml-dev 0.3.0-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Lastfm.Http_ocamlnet.html">
<link rel="next" href="Lastfm.Radio.html">
<link rel="Up" href="Lastfm.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Lastfm_generic" rel="Chapter" href="Lastfm_generic.html">
<link title="Lastfm" rel="Chapter" href="Lastfm.html"><link title="Types" rel="Section" href="#2_Types">
<link title="Common API" rel="Section" href="#2_CommonAPI">
<link title="Basic API" rel="Section" href="#2_BasicAPI">
<link title="Advanced API" rel="Section" href="#2_AdvancedAPI">
<title>Lastfm.Audioscrobbler</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Lastfm.Http_ocamlnet.html" title="Lastfm.Http_ocamlnet">Previous</a>
&nbsp;<a class="up" href="Lastfm.html" title="Lastfm">Up</a>
&nbsp;<a class="post" href="Lastfm.Radio.html" title="Lastfm.Radio">Next</a>
</div>
<h1>Module <a href="type_Lastfm.Audioscrobbler.html">Lastfm.Audioscrobbler</a></h1>

<pre><span class="keyword">module</span> Audioscrobbler: <code class="type"><a href="Lastfm_generic.Audioscrobbler_t.html">Lastfm_generic.Audioscrobbler_t</a></code><code class="type"> </code></pre><div class="info module top">
Implementation of Audioscrobbler using the ocamlnet
 Http request.<br>
</div>
<hr width="100%">
<br>
Audioscrobbler is the submission protocol as described at
<p>

     <a href="http://www.audioscrobbler.net/development/protocol/">http://www.audioscrobbler.net/development/protocol/</a><br>
<br>
Audioscrobbler is the submission protocol as described at
<p>

     <a href="http://www.audioscrobbler.net/development/protocol/">http://www.audioscrobbler.net/development/protocol/</a><br>
<br>
<h2 id="2_Types">Types</h2><br>

<pre><code><span id="TYPEsource"><span class="keyword">type</span> <code class="type"></code>source</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsource.User"><span class="constructor">User</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsource.Broadcast"><span class="constructor">Broadcast</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsource.Recommendation"><span class="constructor">Recommendation</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsource.Lastfm"><span class="constructor">Lastfm</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsource.Unknown"><span class="constructor">Unknown</span></span></code></td>

</tr></table>

<div class="info ">
source of the track<br>
</div>


<pre><code><span id="TYPErating"><span class="keyword">type</span> <code class="type"></code>rating</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTrating.Love"><span class="constructor">Love</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTrating.Ban"><span class="constructor">Ban</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTrating.Skip"><span class="constructor">Skip</span></span></code></td>

</tr></table>

<div class="info ">
possible rating for the track<br>
</div>


<pre><code><span id="TYPEaction"><span class="keyword">type</span> <code class="type"></code>action</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTaction.NowPlaying"><span class="constructor">NowPlaying</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTaction.Submit"><span class="constructor">Submit</span></span></code></td>

</tr></table>

<div class="info ">
type of action<br>
</div>


<pre><code><span id="TYPEsong"><span class="keyword">type</span> <code class="type"></code>song</span> = {</code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.artist">artist</span>&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.track">track</span>&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.time">time</span>&nbsp;: <code class="type">float option</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.source">source</span>&nbsp;: <code class="type"><a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsource">source</a> option</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.rating">rating</span>&nbsp;: <code class="type"><a href="Lastfm_generic.Audioscrobbler_t.html#TYPErating">rating</a> option</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.length">length</span>&nbsp;: <code class="type">float option</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.album">album</span>&nbsp;: <code class="type">string option</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.trackauth">trackauth</span>&nbsp;: <code class="type">string option</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.tracknumber">tracknumber</span>&nbsp;: <code class="type">int option</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsong.musicbrainzid">musicbrainzid</span>&nbsp;: <code class="type">string option</code>;</code></td>

</tr></table>
}

<div class="info ">
song submission type<br>
</div>


<pre><code><span id="TYPEerror"><span class="keyword">type</span> <code class="type"></code>error</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.Http"><span class="constructor">Http</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.Banned"><span class="constructor">Banned</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.Badauth"><span class="constructor">Badauth</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.Badtime"><span class="constructor">Badtime</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.Failed"><span class="constructor">Failed</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.UnknownError"><span class="constructor">UnknownError</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.Success"><span class="constructor">Success</span></span></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.Internal"><span class="constructor">Internal</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTerror.BadData"><span class="constructor">BadData</span></span> <span class="keyword">of</span> <code class="type">string</code></code></td>

</tr></table>

<div class="info ">
various errors<br>
</div>


<pre><span id="EXCEPTIONError"><span class="keyword">exception</span> Error</span> <span class="keyword">of</span> <code class="type"><a href="Lastfm_generic.Audioscrobbler_t.html#TYPEerror">error</a></code></pre>

<pre><span id="VALstring_of_error"><span class="keyword">val</span> string_of_error</span> : <code class="type"><a href="Lastfm_generic.Audioscrobbler_t.html#TYPEerror">error</a> -> string</code></pre><div class="info ">
Get meaning of Error e<br>
</div>

<pre><span id="VALbase_port"><span class="keyword">val</span> base_port</span> : <code class="type">int Pervasives.ref</code></pre><div class="info ">
Base port. Default: 80<br>
</div>

<pre><span id="VALbase_host"><span class="keyword">val</span> base_host</span> : <code class="type">string Pervasives.ref</code></pre><div class="info ">
Base host. Default: "post.audioscrobbler.com"<br>
</div>
<br>
<h2 id="2_CommonAPI">Common API</h2>
<p>

     Functions common to both basic and advanced APIs<br>

<pre><span id="VALget_song"><span class="keyword">val</span> get_song</span> : <code class="type">?time:float -><br>       ?source:<a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsource">source</a> -><br>       ?rating:<a href="Lastfm_generic.Audioscrobbler_t.html#TYPErating">rating</a> -><br>       ?length:float -><br>       ?album:string -><br>       ?tracknumber:int -><br>       ?musicbrainzid:string -><br>       ?trackauth:string -><br>       artist:string -> track:string -> unit -> <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a></code></pre><div class="info ">
<code class="code">get_song</code> 
        create a song record based on given values.
<p>

        Optional records can be ommited there.<br>
</div>

<pre><span id="VALcheck_song"><span class="keyword">val</span> check_song</span> : <code class="type"><a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a> -><br>       <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEaction">action</a> -> unit</code></pre><div class="info ">
Check wether required song informations
        are supplied for given action.
<p>

        Raises <code class="code">Error (BadData reason)</code> if invalid data is given.
<p>

        See protocol details there:
<p>

          <a href="http://www.audioscrobbler.net/development/protocol/">http://www.audioscrobbler.net/development/protocol/</a><br>
</div>
<br>
<h2 id="2_BasicAPI">Basic API</h2> 
<p>

     Using this API, all requests are done in one single step<br>

<pre><span id="VALdo_np"><span class="keyword">val</span> do_np</span> : <code class="type">?timeout:float -><br>       ?host:string * int -><br>       <a href="Lastfm_generic.html#TYPEclient">Lastfm_generic.client</a> -><br>       <a href="Lastfm_generic.html#TYPElogin">Lastfm_generic.login</a> -> <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a> -> unit</code></pre><div class="info ">
<code class="code">do_np client login song</code>
     execute a nowplaying request 
     with authentification 
<p>

     Optional host parameter is a pair
     "host",port to override the global
     values.<br>
</div>

<pre><span id="VALdo_submit"><span class="keyword">val</span> do_submit</span> : <code class="type">?timeout:float -><br>       ?host:string * int -><br>       <a href="Lastfm_generic.html#TYPEclient">Lastfm_generic.client</a> -><br>       <a href="Lastfm_generic.html#TYPElogin">Lastfm_generic.login</a> -><br>       <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a> list -><br>       (<a href="Lastfm_generic.Audioscrobbler_t.html#TYPEerror">error</a> * <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a>)<br>       list</code></pre><div class="info ">
<code class="code">do_submit client login songs</code>
      execute a nowplaying request 
      with authentification. 
<p>

     This functions returns a list
     songs for which supplied informations
     were incomplete, with corresponding exception 
     (see <code class="code">check_song</code> source)<br>
</div>
<br>
<h2 id="2_AdvancedAPI">Advanced API</h2> 
<p>

     This API is for advanced usages.
<p>

     You may use it this way:
     <OL>
<li>handshake : initiate session </li>
<li>np/submit: execute request </li>
</OL>

<p>

    The module will cache session informations and avoid redundant
    requests, so you might always call handshake. 
<p>

    However, if a np or submit fails, it can be because
    the session has expired on server side, but the module cache
    still refered to it. So you might clear this session id, and
    try another handshake+submit/np.
<p>

    Check do_no and do_submit for examples.<br>

<pre><span id="VALhandshake"><span class="keyword">val</span> handshake</span> : <code class="type">?timeout:float -><br>       ?host:string * int -> <a href="Lastfm_generic.html#TYPEclient">Lastfm_generic.client</a> -> <a href="Lastfm_generic.html#TYPElogin">Lastfm_generic.login</a> -> string</code></pre><div class="info ">
<code class="code">handshake client login</code> 
     open session, returns session ID 
<p>

     Optional host parameter is a pair 
     "host",port to override the global
     values.<br>
</div>

<pre><span id="VALnp"><span class="keyword">val</span> np</span> : <code class="type">?timeout:float -> string -> <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a> -> unit</code></pre><div class="info ">
<code class="code">np sessionID track</code>
     execute a nowplaying request<br>
</div>

<pre><span id="VALsubmit"><span class="keyword">val</span> submit</span> : <code class="type">?timeout:float -><br>       string -><br>       <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a> list -><br>       (<a href="Lastfm_generic.Audioscrobbler_t.html#TYPEerror">error</a> * <a href="Lastfm_generic.Audioscrobbler_t.html#TYPEsong">song</a>)<br>       list</code></pre><div class="info ">
<code class="code">submit sessionID tracks</code>
     execute a submit request 
<p>

     This functions returns a list
     songs for which supplied informations
     were incomplete, with corresponding exception 
    (see check_song)<br>
</div>
</body></html>