Skip to content

JrodManU/mattermost-java-sdk

Repository files navigation

mattermost-java-sdk

Warning, this project is in the early stages of development

Add mattermost-java-sdk with gradle

implementation group: 'com.jrodmanu', name: 'mattermost-java-sdk', version: '1.2'

Example to send a message:

try {
    MattermostClient client = new MattermostClient.Builder("https://your-mattermost.com/api/v4")
            .setAccessToken("your access token")
            .setDefaultTeam("your team")
            .build();

    String channelId = client.channels.searchChannels(new SearchChannelsParams.Builder("your channel").build())[0].id;

    Post post = client.posts.createPost(
            new CreatePostParams.Builder("There is no need to be afraid")
                    .setChannelId(channelId)
                    .build()
    );
} catch (MattermostException e) {
    e.printStackTrace();
}

About

java sdk to work with the v4 Mattermost API

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages