def apply()

in play-v29/src/main/scala/com/gu/googleauth/internal/DirectoryService.scala [10:16]


  def apply(googleCredentials: GoogleCredentials, scope: String): Directory = {
    val credentials = googleCredentials.createScoped(scope)
    val transport = GoogleNetHttpTransport.newTrustedTransport()
    val jsonFactory = GsonFactory.getDefaultInstance
    new Directory.Builder(transport, jsonFactory, new HttpCredentialsAdapter(credentials))
      .setApplicationName("play-googleauth").build()
  }