initialise repo
[debian/orchestra.git] / doc / audience_api.txt
1 Audience API:
2
3 So:  Our Audience needs a way to do stuff.
4
5 All key names (quoted below) are case sensitive.
6
7 Overview:
8   Connect to the Unix Socket.
9   Send JSON.
10   Read JSON response back.
11   Close socket.
12
13 QUEUE JOB:
14
15 Request:
16 - dict:
17   - 'op': 'queue'
18   - 'score':  Score Name
19   - 'players':  Array
20     - playername
21   - 'scope': either 'all' or 'one'
22   - 'params': dict
23     - k/v's passed through to job.
24
25 Response:
26 - array:
27 [error, jobid]
28
29 GET STATUS:
30 Request:
31 - dict:
32   - 'op': 'status'
33   - 'id': jobid
34
35 Response:
36 - array:
37 [error, dict]
38
39 dict is:
40 - 'status': aggregated result "OK/Failure"
41 - 'players': dict - individual results
42   - hostname: dict
43     - 'status': individual OK/Failure
44     - 'response': dict
45
46 error is 'OK' if successful.  jobid is the JobID if sucessful.
47
48 Error is otherwise an error mesage.
49
50