Skip to content

0.1.0

Latest
Compare
Choose a tag to compare
@eed3si9n eed3si9n released this 17 May 16:08
· 7 commits to develop since this release
v0.1.0
c573697

repatch-github 0.1.0 is a Dispatch plugin for Github API v3.

import dispatch._
import Defaults._
import repatch.github.{request=>gh}
import scala.concurrent._, scala.concurrent.duration._

scala> val client = gh.LocalConfigClient()
val client: repatch.github.request.LocalConfigClient = LocalConfigClient(OAuthClient(****,List(StringMediaType(application/json), GithubMediaType(Some(v3),None,Some(json)))))

scala> val http = Http.withConfiguration(identity)
val http: dispatch.Http = Http(org.asynchttpclient.DefaultAsyncHttpClientConfig$Builder@32fedcd0)

scala> val issues = http(client(gh.repo("sbt", "sbt").issues.page(1)) > as.repatch.github.response.Issues)
val issues: dispatch.Future[repatch.github.response.Paged[repatch.github.response.Issue]] = Future(<not completed>)

scala> Await.result(issues, 10.seconds)
val res0: repatch.github.response.Paged[repatch.github.response.Issue] = ....

scala> val issueSeq = res0.items
val issueSeq: Seq[repatch.github.response.Issue] =
List(Issue(https://api.github.com/repos/sbt/sbt/issues/6512,Some(https://github.com/sbt/sbt/issues/6512),Some(6512),Some(open),Some(`forceUpdatePeriod` doesn't work with non-fresh sbt run),Some(relates to [Add forceUpdatePeriod](https://github.com/sbt/sbt/pull/2017)
@ajsquared

# Steps
sbt.version = `1.5.2`
....

scala> http.shutdown()