Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | public function get($appId, $recordId, $order = 'desc', $offset = 0, $limit = 10, $guestSpaceId = null) |
||
37 | { |
||
38 | $options = ['json' => [ |
||
39 | 'app' => $appId, |
||
40 | 'record' => $recordId, |
||
41 | 'order' => $order, |
||
42 | 'offset' => $offset, |
||
43 | 'limit' => $limit |
||
44 | ]]; |
||
45 | |||
46 | /** @var JsonStream $stream */ |
||
47 | $stream = $this->client |
||
48 | ->get(KintoneApi::generateUrl('record/comments.json', $guestSpaceId), $options) |
||
49 | ->getBody(); |
||
50 | |||
51 | return $stream->jsonSerialize()['comments']; |
||
52 | } |
||
53 | } |