Package: mattermost
Generated from api/packages/mattermost
Source: api/packages/mattermost · imported version 0.1.6. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”What does it do
Section titled “What does it do”This package is used for Mattermost integration.
It listens for Events then add/remove user for mattermost and particular channels either as standard user or admin.
Installing
Section titled “Installing”composer require ulams/mattermost
Example
Section titled “Example”You can configure the package using Facade
Config::set('mattermost.package_status', PackageStatusEnum::ENABLED);Config::set('mattermost.servers.default.host', 'localhost');Config::set('mattermost.servers.default.login', 'login');Config::set('mattermost.servers.default.password', 'password');or /api/admin/config endpoint
$this->actingAs($this->user, 'api')->json( 'POST', '/api/admin/config', [ 'config' => [ [ 'key' => 'mattermost.package_status', 'value' => PackageStatusEnum::ENABLED, ], [ 'key' => 'mattermost.servers.default.host', 'value' => 'localhost', ], [ 'key' => 'mattermost.servers.default.login', 'value' => 'login', ], [ 'key' => 'mattermost.servers.default.password', 'value' => 'password', ], ] ]);Endpoints
Section titled “Endpoints”All the endpoints are defined in
Run ./vendor/bin/phpunit to run tests. See tests folder as it’s quite good staring point as documentation appendix.
Test details
Listeners
Section titled “Listeners”Handling events
Ulams\Auth\Events\AccountConfirmed=> add user to MattermostUlams\Auth\Events\AccountDeleted=> remove user from MattermostUlams\Auth\Events\AccountBlocked=> block user accountUlams\Courses\Events\CourseAssigned=> add user to course channel with member roleUlams\Courses\Events\CourseUnassigned=> remove user from course channelUlams\Courses\Events\CourseTutorAssigned=> add user to course channel with channel_admin roleUlams\Courses\Events\CourseTutorUnassigned=> remove user from course channelUlams\Webinar\Events\WebinarUserAssigned=> add user to webinar channel with member roleUlams\Webinar\Events\WebinarUserUnassigned=> remove user from webinar channelUlams\Webinar\Events\WebinarTrainerAssigned=> add user to webinar channel with channel_admin roleUlams\Webinar\Events\WebinarTrainerUnassigned=> remove user from webinar channel
More documentation in the package
Section titled “More documentation in the package”API endpoints
Section titled “API endpoints”| Method | Path | Auth | Action |
|---|---|---|---|
GET |
/api/mattermost/me |
yes | MattermostController@me |
GET |
/api/mattermost/reset_password |
yes | MattermostController@resetPassword |
GET |
/api/mattermost/generate_credentials |
yes | MattermostController@generateCredentials |
Permissions
Section titled “Permissions”None.
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
| Key | Rules | Public | Read-only |
|---|---|---|---|
mattermost.package_status |
required, string, in: . implode(,, PackageStatusEnum::getValues()) | no | |
mattermost.servers.default.host |
required, string | yes | |
mattermost.servers.default.login |
required, string | no | |
mattermost.servers.default.password |
required, string | no |
Events
Section titled “Events”None.
Artisan commands
Section titled “Artisan commands”None.
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”MATTERMOST_AUTH, MATTERMOST_HOST, MATTERMOST_LOGIN, MATTERMOST_PASSWORD, MATTERMOST_SERVER, MATTERMOST_TOKEN