| @@ 19-61 (lines=43) @@ | ||
| 16 | * |
|
| 17 | * @package Gnello\MattermostRestApi\Models |
|
| 18 | */ |
|
| 19 | class ComplianceModel extends AbstractModel |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var string |
|
| 23 | */ |
|
| 24 | private static $endpoint = '/compliance'; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @param array $requestOptions |
|
| 28 | * @return \Psr\Http\Message\ResponseInterface |
|
| 29 | */ |
|
| 30 | public function createReport(array $requestOptions) |
|
| 31 | { |
|
| 32 | return $this->client->post(self::$endpoint . '/reports', $requestOptions); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param array $requestOptions |
|
| 37 | * @return \Psr\Http\Message\ResponseInterface |
|
| 38 | */ |
|
| 39 | public function getReports(array $requestOptions) |
|
| 40 | { |
|
| 41 | return $this->client->get(self::$endpoint . '/reports', $requestOptions); |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @param $reportId |
|
| 46 | * @return \Psr\Http\Message\ResponseInterface |
|
| 47 | */ |
|
| 48 | public function getReport($reportId) |
|
| 49 | { |
|
| 50 | return $this->client->get(self::$endpoint . '/reports/' . $reportId); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * @param $reportId |
|
| 55 | * @return \Psr\Http\Message\ResponseInterface |
|
| 56 | */ |
|
| 57 | public function downloadReport($reportId) |
|
| 58 | { |
|
| 59 | return $this->client->get(self::$endpoint . '/reports/' . $reportId . '/download'); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| @@ 19-71 (lines=53) @@ | ||
| 16 | * |
|
| 17 | * @package Gnello\MattermostRestApi\Models |
|
| 18 | */ |
|
| 19 | class EmojiModel extends AbstractModel |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var string |
|
| 23 | */ |
|
| 24 | private static $endpoint = '/emoji'; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @param array $requestOptions |
|
| 28 | * @return \Psr\Http\Message\ResponseInterface |
|
| 29 | */ |
|
| 30 | public function createCustomEmoji(array $requestOptions) |
|
| 31 | { |
|
| 32 | return $this->client->post(self::$endpoint, $requestOptions, 'multipart'); |
|
| 33 | } |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @param array $requestOptions |
|
| 37 | * @return \Psr\Http\Message\ResponseInterface |
|
| 38 | */ |
|
| 39 | public function getListOfCustomEmoji(array $requestOptions) |
|
| 40 | { |
|
| 41 | return $this->client->get(self::$endpoint, $requestOptions); |
|
| 42 | } |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @param $emojiId |
|
| 46 | * @return \Psr\Http\Message\ResponseInterface |
|
| 47 | */ |
|
| 48 | public function getCustomEmoji($emojiId) |
|
| 49 | { |
|
| 50 | return $this->client->get(self::$endpoint . '/' . $emojiId); |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * @param $emojiId |
|
| 55 | * @return \Psr\Http\Message\ResponseInterface |
|
| 56 | */ |
|
| 57 | public function deleteCustomEmoji($emojiId) |
|
| 58 | { |
|
| 59 | return $this->client->delete(self::$endpoint . '/' . $emojiId); |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @param $emojiId |
|
| 64 | * @return \Psr\Http\Message\ResponseInterface |
|
| 65 | */ |
|
| 66 | public function getCustomEmojiImage($emojiId) |
|
| 67 | { |
|
| 68 | return $this->client->get(self::$endpoint . '/' . $emojiId . '/image'); |
|
| 69 | } |
|
| 70 | ||
| 71 | } |
|
| 72 | ||