README 1.63 KB
Newer Older
mattl's avatar
mattl committed
1
This is the GNU FM server, compatible with the last.fm API.
2

mattl's avatar
mattl committed
3
To install visit http://yourserver.com/install.php
4

mattl's avatar
mattl committed
5
As things stand you'll need the ADODB module installed.
6

7
Web services API:
mattl's avatar
mattl committed
8 9 10

To test the authentication API once the server is set up:

11 12
  1. Navigate to /2.0/?method=auth.gettoken&api_key=01234567890123456789012345678901&api_sig=01234567890123456789012345678901
     (The api_key and api_sig are only checked to be 32 characters long since Last.FM shared secrets cannot be checked)
mattl's avatar
mattl committed
13

14
  2. Copy the key that is returned by the auth.gettoken method
mattl's avatar
mattl committed
15

16 17
  3. Navigate to /api/auth/?api_key=01234567890123456789012345678901&token=<copied token>
     (Inserting the copied token into the noted place)
mattl's avatar
mattl committed
18

19
  4. Login as testuser/password (this user is hard-coded upon database setup)
mattl's avatar
mattl committed
20

21
  5. Close the browser when requested
mattl's avatar
mattl committed
22

23 24
  6. Navigate to /2.0/?method=auth.getsession&api_key=01234567890123456789012345678901&api_sig=01234567890123456789012345678901&token=<copied token>
     (Once again substituting the old copied token into the noted place)
25

mattl's avatar
mattl committed
26
  7. The 32-byte key returned between the <key> tags in this response will be used in the Submissions protocol handshake
27 28

Submissions API:
mattl's avatar
mattl committed
29

30 31 32 33
 The submissions API (http://www.last.fm/api/submissions) is used by clients for scrobbling tracks, authentication can either be carried out with a token from the web services API or via a token created by "md5(md5(password) + timestamp)"

 To test standard authentication:

clint's avatar
clint committed
34
 1. Visit /?hs=true&p=1.2&u=testuser&t=1238855138&a=a40dfdc5aa3012c64425a5953267b232&c=tst
mattl's avatar
mattl committed
35

36
 2. You should receive "OK" (followed by a session id, and the URL for the now playing and submissions servers).