1App::KGB::API(3) User Contributed Perl Documentation App::KGB::API(3)
2
3
4
6 App::KGB::API -- KGB bot API documentation
7
9 General, authentication
10 Version 4 uses JSON-RPC as described in
11 <http://http://json-rpc.org/wiki/specification> with one extension.
12 Since all requests are authenticated, two HTTP headers need to be
13 included:
14
15 X-KGB-Project: project-name
16 X-KGB-Auth: hash
17
18 The project name is the string identifying the project on the server
19 side, and the hash is the hexadecimal representation of the SHA-1 hash
20 calculated over the following data:
21
22 Project password
23 This is the shared password known to the client and the server.
24
25 project-name
26 request-text
27 This is the JSON-encoded request text. The same that is sent in the
28 HTTP body.
29
30 Commit notification
31 Request is a JSON-RPC call to a method called commit_v4 with a single
32 argument, which is a map with the following possible keys:
33
34 repo_id project-name
35 rev_prefix revision-prefix
36 Usually "r" for Subversion commits
37
38 commit_id commit id
39 Subversion revision, Git hash or just empty (for CVS).
40
41 changes changes list
42 A list of changes, encoded as strings. It is simple file name
43 prepended with "(A)" for added, "(M)" (or nothing) for modified and
44 "(D)" for deleted. See App::KGB::Change.
45
46 commit_log log message
47 author user/name
48 branch branch name
49 module module name
50 extra additional information
51 A map with extra information. Currently "web_link" is the only
52 member that the server recognises.
53
54 Plain message relay
55 The message relay calls are to the relay_message method, with the only
56 argument the message to be relayed.
57
59 kgb-client(1), kgb-bot(1)
60
62 Damyan Ivanov dmn@debian.org
63
65 Copyright (C) 2012 Damyan Ivanov
66
67 This program is free software; you can redistribute it and/or modify it
68 under the terms of the GNU General Public License as published by the
69 Free Software Foundation; either version 2 of the License, or (at your
70 option) any later version.
71
72 This program is distributed in the hope that it will be useful, but
73 WITHOUT ANY WARRANTY; without even the implied warranty of
74 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
75 General Public License for more details.
76
77 You should have received a copy of the GNU General Public License along
78 with this program; if not, write to the Free Software Foundation, Inc.,
79 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
80
81
82
83perl v5.34.0 2021-07-22 App::KGB::API(3)