Skip to content

okapies/akka-mastodon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

akka-mastodon

Mastodon client based on Akka Streams.

Usage

import akka.actor.ActorSystem
import akka.http.scaladsl.Http
import akka.stream.ActorMaterializer
import com.github.okapies.akka.mastodon.Timeline
import com.github.okapies.akka.mastodon.scaladsl.MastodonClient

implicit val system = ActorSystem()
implicit val materializer = ActorMaterializer()
implicit val executionContext = system.dispatcher

val mastodonHost = "https://..."
val accessToken = "..."

MastodonClient(mastodonHost, accessToken)
  .timelines(Timeline.home())
  .runForeach { status => println(status) }
  .andThen { _ =>
      Http().shutdownAllConnectionPools().onComplete(_ => system.terminate())
  }

Releases

No releases published

Packages

No packages published

Languages