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:
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)))
+}