@@ -47,7 +47,7 @@ import org.json.JSONException
47
47
import org.json.JSONObject
48
48
49
49
/* * FirebaseFunctions lets you call Cloud Functions for Firebase. */
50
- class FirebaseFunctions
50
+ public class FirebaseFunctions
51
51
@AssistedInject
52
52
internal constructor (
53
53
context: Context ,
@@ -105,22 +105,25 @@ internal constructor(
105
105
}
106
106
107
107
/* * Returns a reference to the callable HTTPS trigger with the given name. */
108
- fun getHttpsCallable (name : String ): HttpsCallableReference {
108
+ public fun getHttpsCallable (name : String ): HttpsCallableReference {
109
109
return HttpsCallableReference (this , name, HttpsCallOptions ())
110
110
}
111
111
112
112
/* * Returns a reference to the callable HTTPS trigger with the provided URL. */
113
- fun getHttpsCallableFromUrl (url : URL ): HttpsCallableReference {
113
+ public fun getHttpsCallableFromUrl (url : URL ): HttpsCallableReference {
114
114
return HttpsCallableReference (this , url, HttpsCallOptions ())
115
115
}
116
116
117
117
/* * Returns a reference to the callable HTTPS trigger with the given name and call options. */
118
- fun getHttpsCallable (name : String , options : HttpsCallableOptions ): HttpsCallableReference {
118
+ public fun getHttpsCallable (name : String , options : HttpsCallableOptions ): HttpsCallableReference {
119
119
return HttpsCallableReference (this , name, HttpsCallOptions (options))
120
120
}
121
121
122
122
/* * Returns a reference to the callable HTTPS trigger with the provided URL and call options. */
123
- fun getHttpsCallableFromUrl (url : URL , options : HttpsCallableOptions ): HttpsCallableReference {
123
+ public fun getHttpsCallableFromUrl (
124
+ url : URL ,
125
+ options : HttpsCallableOptions
126
+ ): HttpsCallableReference {
124
127
return HttpsCallableReference (this , url, HttpsCallOptions (options))
125
128
}
126
129
@@ -149,7 +152,7 @@ internal constructor(
149
152
}
150
153
151
154
@Deprecated(" Use {@link #useEmulator(String, int)} to connect to the emulator. " )
152
- fun useFunctionsEmulator (origin : String ) {
155
+ public fun useFunctionsEmulator (origin : String ) {
153
156
Preconditions .checkNotNull(origin, " origin cannot be null" )
154
157
urlFormat = " $origin /%2\$ s/%1\$ s/%3\$ s"
155
158
}
@@ -162,7 +165,7 @@ internal constructor(
162
165
* @param host the emulator host (for example, 10.0.2.2)
163
166
* @param port the emulator port (for example, 5001)
164
167
*/
165
- fun useEmulator (host : String , port : Int ) {
168
+ public fun useEmulator (host : String , port : Int ) {
166
169
emulatorSettings = EmulatedServiceSettings (host, port)
167
170
}
168
171
@@ -318,7 +321,7 @@ internal constructor(
318
321
return tcs.task
319
322
}
320
323
321
- companion object {
324
+ public companion object {
322
325
/* * A task that will be resolved once ProviderInstaller has installed what it needs to. */
323
326
private val providerInstalled = TaskCompletionSource <Void >()
324
327
@@ -370,7 +373,7 @@ internal constructor(
370
373
* `"us-central1"` or `"https://mydomain.com"`.
371
374
*/
372
375
@JvmStatic
373
- fun getInstance (app : FirebaseApp , regionOrCustomDomain : String ): FirebaseFunctions {
376
+ public fun getInstance (app : FirebaseApp , regionOrCustomDomain : String ): FirebaseFunctions {
374
377
Preconditions .checkNotNull(app, " You must call FirebaseApp.initializeApp first." )
375
378
Preconditions .checkNotNull(regionOrCustomDomain)
376
379
val component = app.get(FunctionsMultiResourceComponent ::class .java)
@@ -384,7 +387,7 @@ internal constructor(
384
387
* @param app The app for the Firebase project.
385
388
*/
386
389
@JvmStatic
387
- fun getInstance (app : FirebaseApp ): FirebaseFunctions {
390
+ public fun getInstance (app : FirebaseApp ): FirebaseFunctions {
388
391
return getInstance(app, " us-central1" )
389
392
}
390
393
@@ -395,13 +398,13 @@ internal constructor(
395
398
* `"us-central1"` or `"https://mydomain.com"`.
396
399
*/
397
400
@JvmStatic
398
- fun getInstance (regionOrCustomDomain : String ): FirebaseFunctions {
401
+ public fun getInstance (regionOrCustomDomain : String ): FirebaseFunctions {
399
402
return getInstance(FirebaseApp .getInstance(), regionOrCustomDomain)
400
403
}
401
404
402
405
/* * Creates a Cloud Functions client with the default app. */
403
406
@JvmStatic
404
- fun getInstance (): FirebaseFunctions {
407
+ public fun getInstance (): FirebaseFunctions {
405
408
return getInstance(FirebaseApp .getInstance(), " us-central1" )
406
409
}
407
410
}
0 commit comments