ConduitClient를 사용하여 새 작업을 만드는 방법을 알았습니다.
<?php
require_once '/your/path/to/phutil/src/__phutil_library_init__.php';
// first you need to connect:
$client = new ConduitClient('https://your_phabricator_instance');
$params = array(
'certificate' => 'your conduit certificate from https://your_phabricator_instance/settings/panel/conduit/',
'client' => 'mytestclient',
'clientVersion' => '1.0',
'user' => 'your username',
'host' => 'https://your_phabricator_instance' // do not add path!
);
$client->callMethodSynchronous('conduit.connect', $params);
// then you can call methods:
$params = array(
'title' => 'test task',
'description' => 'test task'
);
$client->callMethodSynchronous('maniphest.createtask', $params);
올바른 값으로,
require_once
에서 인증서, 호스트 이름과 사용자의 경로를 교체하고 작동한다 : 당신은 같은 방법을 사용하는 도관 메소드를 호출 할 수 있어야합니다. 잘못된 것이 있으면 자세한 정보가있는 예외가 발생합니다.
방법과 목록이 전화하는 매개 변수이 가능한 것은 https://your-phabricator-instance/conduit
오에서 당신의 파브리 케이 터의 예를 볼 수 있습니다, 그리고 할 수있는 API는 그래서 당신은 $result = $client->callMethodSynchronous(...)
출처
2014-10-19 15:57:45
rve
감사합니다. 부도덕 한로드 블록에 대한 몇 가지 팁 : __phutil_library_init __. php는 phutricer와는 별도의 소스 트리 인 phutil에서 가져온 것입니다. 또한 phabricator에 들어가서 새로운 bot 사용자를 추가 한 다음 해당 사용자의 설정을 편집하고 거기에서 인증서를 받았습니다. 이전에 내 자신의 인증서를 사용하려고했습니다 (사용자가 일치하지 않기 때문에 작동하지 않습니다). – JasonZ