| @@ 19-42 (lines=24) @@ | ||
| 16 | * |
|
| 17 | * @package Gnello\MattermostRestApi\Models |
|
| 18 | */ |
|
| 19 | class BrandModel extends AbstractModel |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var string |
|
| 23 | */ |
|
| 24 | private static $endpoint = '/brand'; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @return \Psr\Http\Message\ResponseInterface |
|
| 28 | */ |
|
| 29 | public function getBrandImage() |
|
| 30 | { |
|
| 31 | return $this->client->get(self::$endpoint . '/image'); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @param array $requestOptions |
|
| 36 | * @return \Psr\Http\Message\ResponseInterface |
|
| 37 | */ |
|
| 38 | public function uploadBrandImage(array $requestOptions) |
|
| 39 | { |
|
| 40 | return $this->client->post(self::$endpoint . '/image', $requestOptions, 'multipart'); |
|
| 41 | } |
|
| 42 | } |
|
| 43 | ||
| @@ 19-41 (lines=23) @@ | ||
| 16 | * |
|
| 17 | * @package Gnello\MattermostRestApi\Models |
|
| 18 | */ |
|
| 19 | class LDAPModel extends AbstractModel |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var string |
|
| 23 | */ |
|
| 24 | private static $endpoint = '/ldap'; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @return \Psr\Http\Message\ResponseInterface |
|
| 28 | */ |
|
| 29 | public function syncWithLDAP() |
|
| 30 | { |
|
| 31 | return $this->client->post(self::$endpoint . '/sync'); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @return \Psr\Http\Message\ResponseInterface |
|
| 36 | */ |
|
| 37 | public function testLDAPConfiguration() |
|
| 38 | { |
|
| 39 | return $this->client->post(self::$endpoint . '/test'); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 19-41 (lines=23) @@ | ||
| 16 | * |
|
| 17 | * @package Gnello\MattermostRestApi\Models |
|
| 18 | */ |
|
| 19 | class ElasticsearchModel extends AbstractModel |
|
| 20 | { |
|
| 21 | /** |
|
| 22 | * @var string |
|
| 23 | */ |
|
| 24 | private static $endpoint = '/elasticsearch'; |
|
| 25 | ||
| 26 | /** |
|
| 27 | * @return \Psr\Http\Message\ResponseInterface |
|
| 28 | */ |
|
| 29 | public function testElasticsearchConfiguration() |
|
| 30 | { |
|
| 31 | return $this->client->post(self::$endpoint . '/test'); |
|
| 32 | } |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @return \Psr\Http\Message\ResponseInterface |
|
| 36 | */ |
|
| 37 | public function purgeAllElasticsearchIndexes() |
|
| 38 | { |
|
| 39 | return $this->client->post(self::$endpoint . '/purge_indexes'); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||