Mattermost Plugin Api banner
mattermost mattermost

Mattermost Plugin Api

Development community

Description

A hackathon project to explore reworking the Mattermost Plugin API.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

This repository has been moved into a monorepo located in https://github.com/mattermost/mattermost. Please take a look a the [godoc](https://pkg.go.dev/github.com/mattermost/mattermost/server/public/pluginapi) for more information.

mattermost-plugin-api

[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/mattermost/mattermost-plugin-api) [![ci](https://github.com/mattermost/mattermost-plugin-api/actions/workflows/ci.yaml/badge.svg)](https://github.com/mattermost/mattermost-plugin-api/actions/workflows/ci.yaml) [![Code Coverage](https://img.shields.io/codecov/c/github/mattermost/mattermost-plugin-api/master.svg)](https://codecov.io/gh/mattermost/mattermost-plugin-api/branch/master)

A hackathon project to explore reworking the Mattermost Plugin API.

The plugin API as exposed in [github.com/mattermost/mattermost-server/plugin](http://github.com/mattermost/mattermost-server/blob/master/plugin/api.go) began with the hope of adopting a consistent interface and style. But our vision for how to structure the API changed over time, along with our ability to remain consistent.

Fixing the API in place is difficult. Any backwards incompatible changes to the RPC API would break existing plugins. Even backwards incompatible changes to the plugin helpers would break semver, requiring a coordinated major version bump with parent repository. Adding new methods improves the experience for newer plugins, but forever clutters the [plugin GoDoc](https://godoc.org/github.com/mattermost/mattermost-server/plugin).

Instead, we opted to wrap the existing RPC API and helpers with a client hosted in this separate repository. Issues fixed and improvements added include:

  • *model.AppError eliminated for all API calls, correctly returning an error interface instead
  • methods logically organized by service instead of a flat API (e.g. client.Users.List)
  • custom types eliminated in favour of simple splices (e.g. `[]*mod