App::KGB::API(3pm)
π App::KGB::API π
okay bestie, sit down, hydrate, because this is the KGB bot API documentation and it's literally the blueprint for how your client talks to the bot. no cap, it's kind of iconic.
β¨ VERSION 4 (JSON) β¨
π«Ά General, authentication
So Version 4 rolls with JSON-RPC, exactly as described over at <http://http://json-rpc.org/wiki/specification> β with one lil extension. periodt.
And because every single request has to be authenticated (no sneaking in, we don't do that here), you gotta include two HTTP headers:
X-KGB-Project: project-name
X-KGB-Auth: hash
Let's break it down πΈ
- The project name is the string that identifies the project on the server side, iykyk.
- The hash is the hexadecimal representation of the SHA-1 hash calculated over the following data:
- Project password β this is the shared password, the one both the client and the server know. π€
project-namerequest-textβ this is the JSON-encoded request text. the exact same thing that gets sent in the HTTP body, bestie. same text, no remix.
π Commit notification
The request is a JSON-RPC call to a method called commit_v4, and it takes a single argument: a map with these possible keys:
repo_idβ project-namerev_prefixβ revision-prefix. usually just"r"for Subversion commits, classic.commit_idβ commit id. this is the Subversion revision, the Git hash, or just totally empty (that's the CVS situation π).changesβ changes list. a list of changes, encoded as strings. each one is a simple file name prepended with"(A)"for added,"(M)"(or literally nothing) for modified, and"(D)"for deleted. go check out App::KGB::Change for the deets. πcommit_logβ log messageauthorβ user/namebranchβ branch namemoduleβ module nameextraβ additional information. a map with extra info. currently"web_link"is the only member that the server recognises. that's it, that's the whole list.
π Plain message relay
The message relay calls go to the relay_message method, and the only argument is the message to be relayed. simple. clean. slay. β¨
π SEE ALSO π
π AUTHOR π
Damyan Ivanov dmn@debian.org
π COPYRIGHT & LICENSE π
Copyright (C) 2012 Damyan Ivanov
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
and that's the whole thing, bestie π¦ this was App::KGB::API, shipped with perl v5.40.1, dated 2026-07-10, under the App::KGB::API(3pm) manual. mwah π go forth and authenticate responsibly. π«Άπ
π¦ where this page comes from
- ubuntu stonking: kgb-client 1.62-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms