<commit_before>package client

import play.api.libs.json._
import play.api.libs.ws._
import scala.concurrent.Future
import com.ning.http.client.Realm.AuthScheme

object ApidocClient {

  private val Tokens = Map(
    "f3973f60-be9f-11e3-b1b6-0800200c9a66" -> "<KEY>",
    "<PASSWORD>" -> "<PASSWORD>",
    "c<PASSWORD>" -> "c<PASSWORD>"
  )

  def instance(userGuid: String): Apidoc.Client = {
    val token = Tokens.get(userGuid).getOrElse {
      sys.error(s"No token for user guid[$userGuid]")
    }

    Apidoc.Client(baseUrl = "http://apidoc-sv-ElasticL-1VBM8RAC73AJY-1676446944.us-east-1.elb.amazonaws.com",
                  token = token)
  }

}



object Apidoc {

  implicit val context = scala.concurrent.ExecutionContext.Implicits.global

  case class Client(baseUrl: String, token: String) {

    private val Password = ""

    def wsUrl(url: String) = {
      println("curl -u \"" + token + ":\" " + baseUrl + url)
      WS.url(baseUrl + url).withAuth(token, Password, AuthScheme.BASIC)
    }

    lazy val organizations = OrganizationsResource(this)
    lazy val memberships = MembershipsResource(this)
    lazy val membershipRequests = MembershipRequestsResource(this)
    lazy val membershipRequestReviews = MembershipRequestReviewsResource(this)
    lazy val services = ServicesResource(this)
    lazy val users = UsersResource(this)<commit_msg>Temporary hack to point web to new svc backend<commit_after>package client

import play.api.libs.json._
import play.api.libs.ws._
import scala.concurrent.Future
import com.ning.http.client.Realm.AuthScheme

object ApidocClient {

  private val Tokens = Map(
    "f3973f60-be9f-11e3-b1b6-0800200c9a66" -> "<KEY>",
    "1<PASSWORD>f<PASSWORD>-<PASSWORD>-<PASSWORD>-<PASSWORD>-<PASSWORD>" -> "1c59f283-353d-4d91-bff2-0a0e2956fefe",
    "c6a7ca2f-4f67-4079-8314-f5812d44946f" -> "c6a7ca2f-4f67-4079-8314-f5812d44946f"
  )

  def instance(userGuid: String): Apidoc.Client = {
    val token = Tokens.get(userGuid).getOrElse {
      sys.error(s"No token for user guid[$userGuid]")
    }

    Apidoc.Client(baseUrl = "http://apidoc-sv-ElasticL-1CXV8PLH76T24-272746718.us-east-1.elb.amazonaws.com",
                  token = token)
  }

}



object Apidoc {

  implicit val context = scala.concurrent.ExecutionContext.Implicits.global

  case class Client(baseUrl: String, token: String) {

    private val Password = ""

    def wsUrl(url: String) = {
      println("curl -u \"" + token + ":\" " + baseUrl + url)
      WS.url(baseUrl + url).withAuth(token, Password, AuthScheme.BASIC)
    }

    lazy val organizations = OrganizationsResource(this)
    lazy val memberships = MembershipsResource(this)
    lazy val membershipRequests = MembershipRequestsResource(this)
    lazy val membershipRequestReviews = MembershipRequestReviewsResource(this)
    lazy val services = ServicesResource(this)
    lazy val users = UsersResource(this)
{'fraction_non_alphanumeric': 0.12179930795847752, 'fraction_numerical': 0.048788927335640137, 'mean_word_length': 3.685575364667747, 'pattern_counts': {'":': 2, '<': 15, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6316167', 'n_tokens_mistral': 1089, 'n_tokens_neox': 999, 'n_words': 185}