Skip to content

Latest commit

 

History

History
62 lines (53 loc) · 3.76 KB

README.md

File metadata and controls

62 lines (53 loc) · 3.76 KB

scala-keystone-client license

Scaladoc Latest version

Build Status Codacy Badge Codacy Badge BCH compliance

A pure functional Scala client for Openstack Keystone implemented using Http4s client.

Supported endpoints:

Unsupported endpoints (we accept PRs :)):

Latest scaladoc documentation

Install

Add the following dependency to your build.sbt:

libraryDependencies += "pt.tecnico.dsi" %% "scala-keystone-client" % "0.0.0"

We use semantic versioning.

Usage

import scala.concurrent.ExecutionContext.Implicits.global
import cats.effect._
import org.http4s.client.blaze.BlazeClientBuilder
import pt.tecnico.dsi.openstack.keystone.KeystoneClient

object Example extends IOApp {
  override def run(args: List[String]): IO[ExitCode] = {
    BlazeClientBuilder[IO](global).resource.use { implicit httpClient =>
      for {
        client <- KeystoneClient.fromEnvironment()
        projects <- client.projects.list().compile.toList
        _ = println(projects.mkString("\n"))
      } yield ExitCode.Success
    }
  }
}

License

scala-keystone-client is open source and available under the MIT license.