Skip to content

Commit 79b9173

Browse files
committed
update license informations
1 parent 198c9bb commit 79b9173

File tree

6 files changed

+66
-7
lines changed

6 files changed

+66
-7
lines changed

src/Client.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* This Driver is based entirely on official documentation of the Mattermost Web
44
* Services API and you can extend it by following the directives of the documentation.
55
*
6+
* For the full copyright and license information, please read the LICENSE.txt
7+
* file that was distributed with this source code. For the full list of
8+
* contributors, visit https://github.com/gnello/php-mattermost-driver/contributors
9+
*
610
* God bless this mess.
711
*
812
* @author Luca Agnello <[email protected]>
@@ -104,7 +108,7 @@ private function dispatch($method, $uri, array $options = [])
104108
/**
105109
* @param $uri
106110
* @param array $options
107-
* @return null|\Psr\Http\Message\ResponseInterface
111+
* @return \Psr\Http\Message\ResponseInterface
108112
*/
109113
public function get($uri, array $options = [])
110114
{
@@ -114,7 +118,7 @@ public function get($uri, array $options = [])
114118
/**
115119
* @param $uri
116120
* @param array $options
117-
* @return null|\Psr\Http\Message\ResponseInterface
121+
* @return \Psr\Http\Message\ResponseInterface
118122
*/
119123
public function post($uri, $options = [])
120124
{
@@ -124,7 +128,7 @@ public function post($uri, $options = [])
124128
/**
125129
* @param $uri
126130
* @param array $options
127-
* @return null|\Psr\Http\Message\ResponseInterface
131+
* @return \Psr\Http\Message\ResponseInterface
128132
*/
129133
public function put($uri, $options = [])
130134
{
@@ -134,7 +138,7 @@ public function put($uri, $options = [])
134138
/**
135139
* @param $uri
136140
* @param array $options
137-
* @return null|\Psr\Http\Message\ResponseInterface
141+
* @return \Psr\Http\Message\ResponseInterface
138142
*/
139143
public function delete($uri, $options = [])
140144
{

src/Driver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* This Driver is based entirely on official documentation of the Mattermost Web
44
* Services API and you can extend it by following the directives of the documentation.
55
*
6+
* For the full copyright and license information, please read the LICENSE.txt
7+
* file that was distributed with this source code. For the full list of
8+
* contributors, visit https://github.com/gnello/php-mattermost-driver/contributors
9+
*
610
* God bless this mess.
711
*
812
* @author Luca Agnello <[email protected]>

src/Models/AbstractModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* This Driver is based entirely on official documentation of the Mattermost Web
44
* Services API and you can extend it by following the directives of the documentation.
55
*
6+
* For the full copyright and license information, please read the LICENSE.txt
7+
* file that was distributed with this source code. For the full list of
8+
* contributors, visit https://github.com/gnello/php-mattermost-driver/contributors
9+
*
610
* God bless this mess.
711
*
812
* @author Luca Agnello <[email protected]>

src/Models/ChannelModel.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* This Driver is based entirely on official documentation of the Mattermost Web
4+
* Services API and you can extend it by following the directives of the documentation.
5+
*
6+
* For the full copyright and license information, please read the LICENSE.txt
7+
* file that was distributed with this source code. For the full list of
8+
* contributors, visit https://github.com/gnello/php-mattermost-driver/contributors
9+
*
10+
* God bless this mess.
11+
*
12+
* @author Luca Agnello <[email protected]>
13+
* @link https://api.mattermost.com/
14+
*/
15+
16+
namespace Gnello\Mattermost\Models;
17+
18+
/**
19+
* Class ChannelModel
20+
*
21+
* @package Gnello\Mattermost\Models
22+
*/
23+
class ChannelModel extends AbstractModel
24+
{
25+
/**
26+
* @var string
27+
*/
28+
public static $endpoint = '/channels';
29+
30+
/**
31+
* @param $teamId
32+
* @param array $requestOptions
33+
* @return \Psr\Http\Message\ResponseInterface
34+
*/
35+
public function createChannel($teamId, array $requestOptions)
36+
{
37+
return $this->client->post(TeamModel::$endpoint . '/' . $teamId . '/' . self::$endpoint . '/create', $requestOptions);
38+
}
39+
}

src/Models/TeamModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* This Driver is based entirely on official documentation of the Mattermost Web
44
* Services API and you can extend it by following the directives of the documentation.
55
*
6+
* For the full copyright and license information, please read the LICENSE.txt
7+
* file that was distributed with this source code. For the full list of
8+
* contributors, visit https://github.com/gnello/php-mattermost-driver/contributors
9+
*
610
* God bless this mess.
711
*
812
* @author Luca Agnello <[email protected]>

src/Models/UserModel.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
* This Driver is based entirely on official documentation of the Mattermost Web
44
* Services API and you can extend it by following the directives of the documentation.
55
*
6+
* For the full copyright and license information, please read the LICENSE.txt
7+
* file that was distributed with this source code. For the full list of
8+
* contributors, visit https://github.com/gnello/php-mattermost-driver/contributors
9+
*
610
* God bless this mess.
711
*
812
* @author Luca Agnello <[email protected]>
@@ -125,7 +129,7 @@ public function getUsersListByIds(array $requestOptions)
125129
*/
126130
public function getUserOfChannel($team_id, $channel_id, $offset, $limit)
127131
{
128-
$uri = TeamModel::$endpoint . '/' . $team_id . '/channels/' . $channel_id . '/' . self::$endpoint . '/' . $offset . '/' . $limit;
132+
$uri = TeamModel::$endpoint . '/' . $team_id . ChannelModel::$endpoint . '/' . $channel_id . '/' . self::$endpoint . '/' . $offset . '/' . $limit;
129133
return $this->client->get($uri);
130134
}
131135

@@ -138,7 +142,7 @@ public function getUserOfChannel($team_id, $channel_id, $offset, $limit)
138142
*/
139143
public function getUserNotOfChannel($team_id, $channel_id, $offset, $limit)
140144
{
141-
$uri = TeamModel::$endpoint . '/' . $team_id . '/channels/' . $channel_id . '/' . self::$endpoint . '/not_in_channel/' . $offset . '/' . $limit;
145+
$uri = TeamModel::$endpoint . '/' . $team_id . ChannelModel::$endpoint . '/' . $channel_id . '/' . self::$endpoint . '/not_in_channel/' . $offset . '/' . $limit;
142146
return $this->client->post($uri);
143147
}
144148

@@ -233,7 +237,7 @@ public function autocompleteUsersOfTeam($team_id, array $requestOptions)
233237
*/
234238
public function autocompleteUsersOfChannel($team_id, $channel_id, array $requestOptions)
235239
{
236-
$uri = TeamModel::$endpoint . '/' . $team_id . '/channels/' . $channel_id . '/' . self::$endpoint . '/autocomplete';
240+
$uri = TeamModel::$endpoint . '/' . $team_id . ChannelModel::$endpoint . '/' . $channel_id . '/' . self::$endpoint . '/autocomplete';
237241
return $this->client->get($uri, $requestOptions);
238242
}
239243
}

0 commit comments

Comments
 (0)