Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rorschach.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <code@rebertia.com>2015-06-03 12:03:00 +0300
committerChris Rebert <code@rebertia.com>2015-06-03 12:03:00 +0300
commit64e843bcaa300119ce02f0c338c86e7881b43ab4 (patch)
treeac690b41add818ad8bda9dc7edf200e57f7bb514 /src/main/scala/com/getbootstrap/rorschach/github/Credentials.scala
parent05a3608eebff1bbd4f78e827267fa3b09ddeca4b (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.scala9
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)))
+}