diff options
author | Bryan Klimt <bklimt@gmail.com> | 2018-06-21 15:25:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-21 15:25:13 -0400 |
commit | f08edbb85c5cbde74c354c478ac9433d2417d748 (patch) | |
tree | c837525029c9657ccf6edbc41e52952bab6f5f60 /Functions/FirebaseFunctions/Public/FIRFunctions.h | |
parent | b271a6e25144be8cf872d028bb82336b5da2074c (diff) |
Add a couple of new small Functions APIs. (#1434)
* Add a Functions constructor that allows setting a region.
* Add a method to set an emulator origin to use.
* Update the changelog
Diffstat (limited to 'Functions/FirebaseFunctions/Public/FIRFunctions.h')
-rw-r--r-- | Functions/FirebaseFunctions/Public/FIRFunctions.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Functions/FirebaseFunctions/Public/FIRFunctions.h b/Functions/FirebaseFunctions/Public/FIRFunctions.h index d01175c..98d7a67 100644 --- a/Functions/FirebaseFunctions/Public/FIRFunctions.h +++ b/Functions/FirebaseFunctions/Public/FIRFunctions.h @@ -42,7 +42,7 @@ NS_SWIFT_NAME(Functions) * Creates a Cloud Functions client with the default app and given region. * @param region The region for the http trigger, such as "us-central1". */ -// + (instancetype)functionsForRegion:(NSString *)region NS_SWIFT_NAME(functions(region:)); ++ (instancetype)functionsForRegion:(NSString *)region NS_SWIFT_NAME(functions(region:)); /** * Creates a Cloud Functions client with the given app and region. @@ -51,8 +51,8 @@ NS_SWIFT_NAME(Functions) */ // clang-format off // because it incorrectly breaks this NS_SWIFT_NAME. -// + (instancetype)functionsForApp:(FIRApp *)app -// region:(NSString *)region NS_SWIFT_NAME(functions(app:region:)); ++ (instancetype)functionsForApp:(FIRApp *)app + region:(NSString *)region NS_SWIFT_NAME(functions(app:region:)); // clang-format on /** @@ -61,6 +61,13 @@ NS_SWIFT_NAME(Functions) */ - (FIRHTTPSCallable *)HTTPSCallableWithName:(NSString *)name NS_SWIFT_NAME(httpsCallable(_:)); +/** + * Changes this instance to point to a Cloud Functions emulator running locally. + * See https://firebase.google.com/docs/functions/local-emulator + * @param origin The origin of the local emulator, such as "http://localhost:5005". + */ +- (void)useFunctionsEmulatorOrigin:(NSString *)origin NS_SWIFT_NAME(useFunctionsEmulator(origin:)); + @end NS_ASSUME_NONNULL_END |