diff options
author | Chris Rebert <code@rebertia.com> | 2015-06-03 12:03:00 +0300 |
---|---|---|
committer | Chris Rebert <code@rebertia.com> | 2015-06-03 12:03:00 +0300 |
commit | 64e843bcaa300119ce02f0c338c86e7881b43ab4 (patch) | |
tree | ac690b41add818ad8bda9dc7edf200e57f7bb514 /src/main/scala/com/getbootstrap/rorschach/github/Credentials.scala | |
parent | 05a3608eebff1bbd4f78e827267fa3b09ddeca4b (diff) |
progress on jcabi-github portingjcabi-github
Diffstat (limited to 'src/main/scala/com/getbootstrap/rorschach/github/Credentials.scala')
-rw-r--r-- | src/main/scala/com/getbootstrap/rorschach/github/Credentials.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/scala/com/getbootstrap/rorschach/github/Credentials.scala b/src/main/scala/com/getbootstrap/rorschach/github/Credentials.scala new file mode 100644 index 0000000..add9893 --- /dev/null +++ b/src/main/scala/com/getbootstrap/rorschach/github/Credentials.scala @@ -0,0 +1,9 @@ +package com.getbootstrap.rorschach.github + +import com.jcabi.github.{Github, RtGithub} +import com.getbootstrap.rorschach.http.{UserAgent, SuperWire} + +case class Credentials(username: String, password: String) { + private def basicGithub: Github = new RtGithub(username, password) + def github(threshold: Int)(implicit userAgent: UserAgent): Github = new RtGithub(basicGithub.entry.through(classOf[SuperWire], userAgent, new Integer(threshold))) +} |