- Support All public Backlog Api
- Modular can use any http library if user want to switch. For now by default we use akka-http. Later we will provide support for others libraries
- Streaming support
- Setup webhook
- OAuth2 support
- Scalajs support
-
GraphQL server -
Usage of auto code generation for protocol by analyse json files at compile-time or using cli tools
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
)
libraryDependencies += "com.github.chaabaj" %% "backlog4s-core" % "0.8.1-SNAPSHOT"
libraryDependencies += "com.github.chaabaj" %% "backlog4s-akka" % "0.8.1-SNAPSHOT"
Look at backlog4s-test contain a program sample
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import com.github.chaabaj.backlog4s.datas._
import com.github.chaabaj.backlog4s.streaming.ApiStream
import com.github.chaabaj.backlog4s.apis.AllApi
import com.github.chaabaj.backlog4s.interpreters.BacklogHttpDslOnAkka
import scala.util.{Failure, Success}
import com.github.chaabaj.backlog4s.dsl.syntax._
object App {
def usingAkka(apiUrl: String, apiKey: String): Unit = {
implicit val system = ActorSystem("test")
implicit val mat = ActorMaterializer()
implicit val scheduler = monix.execution.Scheduler.Implicits.global
val akkaHttpDsl = new BacklogHttpDslOnAkka()
val allApi = new AllApi(apiUrl, AccessKey(apiKey))(akkaHttpDsl)
import allApi._
val task = for {
projects <- projectApi.all().handleError
issues <- issueApi.search(IssueSearch(projectIds = projects.map(_.id))).handleError
} yield issues
task.value.runToFuture.onComplete { response =>
response match {
case Success(data) =>
println(data)
case Failure(ex) =>
ex.printStackTrace()
}
akkaHttpDsl.terminate()
system.terminate()
}
}
def main(args: Array[String]): Unit = {
if (args.length > 1) {
val apiUrl = args.apply(0)
val apiKey = args.apply(1)
usingAkka(apiUrl, apiKey)
} else {
println("Missing argument api url and api key")
}
}
}
import akka.actor.ActorSystem
import akka.stream.ActorMaterializer
import com.github.chaabaj.backlog4s.datas._
import com.github.chaabaj.backlog4s.streaming.ApiStream
import com.github.chaabaj.backlog4s.apis.AllApi
import com.github.chaabaj.backlog4s.interpreters.BacklogHttpDslOnAkka
import scala.util.{Failure, Success}
import com.github.chaabaj.backlog4s.dsl.syntax._
object App {
def usingAkka(apiUrl: String, apiKey: String): Unit = {
implicit val system = ActorSystem("test")
implicit val mat = ActorMaterializer()
implicit val scheduler = monix.execution.Scheduler.Implicits.global
val akkaHttpDsl = new BacklogHttpDslOnAkka()
val allApi = new AllApi(apiUrl, AccessKey(apiKey))(akkaHttpDsl)
import allApi._
val stream = ApiStream.stream(10000, 4)(
(index, count) => issueApi.search(IssueSearch(offset = index, count = count))
).map { issues =>
println(issues.map(_.summary).mkString("\n"))
println()
issues
}
stream.foreach(println).onComplete { response =>
response match {
case Success(_) =>
println("Done")
case Failure(ex) =>
ex.printStackTrace()
}
akkaHttpDsl.terminate()
system.terminate()
}
}
def main(args: Array[String]): Unit = {
if (args.length > 1) {
val apiUrl = args.apply(0)
val apiKey = args.apply(1)
usingAkka(apiUrl, apiKey)
} else {
println("Missing argument api url and api key")
}
}
}