Skip to content

JennyKosta/muffin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muffin


Mattermost API v4 client for Scala 3.


Status

Endpoints Status
Users
Bots
Teams ❇️
Channels ❇️
Posts ❇️
Threads
Files
Uploads
Preferences
Status
Emoji
Reactions
Webhooks
Commands
System
Brand
integration_actions
Insights
Roles
....

Getting started

sttp

Zio or other sttp backend

"com.softwaremill.sttp.client3" %% "httpclient-backend-zio" % "3.5.1" 
import sttp.client3.httpclient.zio.HttpClientZioBackend
import zio.{Task, ZIOAppDefault}
import zio.interop.catz.given

object App extends ZIOAppDefault {
  val run =
    for {
      backend                <- HttpClientZioBackend()

      given HttpClient[Task] <- SttpClient[Task, Task](backend)
      client                  = ApiClient[Task](ClientConfig("API_V4_URL", "TOKEN"))
      
      _ <- client.createPost(CreatePostRequest(ChannelId("CHANNEL_ID"), "Muffin + Mattermost = <3"))
    } yield ()
}

Custom http backend

You just need implement HttpClient trait

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%