/** * Get apps * https://cybozudev.zendesk.com/hc/ja/articles/202931674#step2 * * @param array $ids * @param array $codes * @param string $name * @param array $spaceIds * @param integer $limit * @param integer $offset * @param integer $guestSpaceId * @return array */ public function get(array $ids = [], array $codes = [], $name = null, array $spaceIds = [], $limit = self::MAX_GET_APPS, $offset = 0, $guestSpaceId = null) { $options = ['json' => ['ids' => $ids, 'codes' => $codes, 'name' => $name, 'spaceIds' => $spaceIds]]; $options['json']['limit'] = $limit; $options['json']['offset'] = $offset; return $this->client->get(KintoneApi::generateUrl('apps.json', $guestSpaceId), $options)->getBody()->jsonSerialize(); }
/** * Get users * https://cybozudev.zendesk.com/hc/ja/articles/202363040#step2 * * @param array $ids * @param array $codes * @param integer $offset * @param integer $limit * @return array */ public function get(array $ids = [], array $codes = [], $offset = 0, $limit = self::MAX_GET_USERS) { $options = ['json' => ['ids' => !empty($ids) ? $ids : [], 'codes' => !empty($codes) ? $codes : []]]; $options['json']['size'] = $limit; $options['json']['offset'] = $offset; return $this->client->get(UserApi::generateUrl('users.json'), $options)->getBody()->jsonSerialize()['users']; }
/** * Get records * https://cybozudev.zendesk.com/hc/ja/articles/202331474#step2 * * @param integer $appId * @param string $query * @param integer $guestSpaceId * @param boolean $totalCount * @param array|null $fields * @return array */ public function get($appId, $query = '', $guestSpaceId = null, $totalCount = true, array $fields = null) { $options = ['json' => ['app' => $appId, 'query' => $query]]; if ($totalCount) { $options['json']['totalCount'] = $totalCount; } if ($fields) { $options['json']['fields'] = $fields; } return $this->client->get(KintoneApi::generateUrl('records.json', $guestSpaceId), $options)->getBody()->jsonSerialize(); }
/** * Get app JavaScript and CSS customize * https://cybozudev.zendesk.com/hc/ja/articles/204529824 * * @param integer $id * @param integer $guestSpaceId * @return array */ public function getCustomize($id, $guestSpaceId = null) { $options = ['json' => ['app' => $id]]; return $this->client->get(KintoneApi::generateUrl('app/customize.json', $guestSpaceId), $options)->getBody()->jsonSerialize(); }
/** * Get post csv result * https://cybozudev.zendesk.com/hc/ja/articles/202361320 * * @param int $id * @return array */ public function result($id) { $options = ['query' => ['id' => $id]]; return $this->client->get(UserApi::generateUrl('csv/result.json'), $options)->getBody()->jsonSerialize(); }
/** * Get space members * https://cybozudev.zendesk.com/hc/ja/articles/202166220 * * @param integer $id * @param integer $guestSpaceId * @return array */ public function getMembers($id, $guestSpaceId = null) { $options = ['json' => ['id' => $id]]; return $this->client->get(KintoneApi::generateUrl('space/members.json', $guestSpaceId), $options)->getBody()->jsonSerialize(); }
/** * Get record comments * https://cybozudev.zendesk.com/hc/ja/articles/208242326 * * @param int $appId * @param int $recordId * @param string $order "asc" or "desc" * @param int $offset * @param int $limit Max = 10 * @param int $guestSpaceId * @return array */ public function get($appId, $recordId, $order = 'desc', $offset = 0, $limit = 10, $guestSpaceId = null) { $options = ['json' => ['app' => $appId, 'record' => $recordId, 'order' => $order, 'offset' => $offset, 'limit' => $limit]]; return $this->client->get(KintoneApi::generateUrl('record/comments.json', $guestSpaceId), $options)->getBody()->jsonSerialize()['comments']; }
/** * Get file * https://cybozudev.zendesk.com/hc/ja/articles/202166180#step1 * * @param string $fileKey * @param int $guestSpaceId * @return string */ public function get($fileKey, $guestSpaceId = null) { $options = ['json' => ['fileKey' => $fileKey]]; $response = $this->client->get(KintoneApi::generateUrl('file.json', $guestSpaceId), $options); return (string) $response->getBody(); }
/** * Get organizations and titles of user * https://cybozudev.zendesk.com/hc/ja/articles/202124774#step2 * * @param string $code * @return array */ public function get($code) { $options = ['json' => ['code' => $code]]; return $this->client->get(UserApi::generateUrl('user/organizations.json'), $options)->getBody()->jsonSerialize()['organizationTitles']; }
/** * Get users and titles of organization * https://cybozudev.zendesk.com/hc/ja/articles/202124774#step2 * * @param string $code * @return array */ public function get($code, $offset = 0, $limit = self::MAX_GET_USERS) { $options = ['json' => ['code' => $code, 'offset' => $offset, 'size' => $limit]]; return $this->client->get(UserApi::generateUrl('organization/users.json'), $options)->getBody()->jsonSerialize()['userTitles']; }
/** * Get record * https://cybozudev.zendesk.com/hc/ja/articles/202331474#step1 * * @param integer $appId * @param integer $id * @param integer $guestSpaceId * @return array */ public function get($appId, $id, $guestSpaceId = null) { $options = ['json' => ['app' => $appId, 'id' => $id]]; return $this->client->get(KintoneApi::generateUrl('record.json', $guestSpaceId), $options)->getBody()->jsonSerialize()['record']; }