Skip to content

added timeZone to ScheduleBuilder #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/firebase_functions_interop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ class ScheduleBuilder {

ScheduleBuilder._(this.nativeInstance);

/// define a time zone for the scheduler to run
ScheduleBuilder timeZone(String timeZone) {
nativeInstance.timeZone(timeZone);
return this;
}

/// Event handler that fires every time a schedule occurs.
js.CloudFunction onRun(DataEventHandler<Message> handler) {
dynamic wrapper(js.EventContext jsContext) =>
Expand Down
4 changes: 4 additions & 0 deletions lib/src/bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,10 @@ abstract class TopicBuilder {
@JS()
@anonymous
abstract class ScheduleBuilder {

/// define a time zone for the scheduler to run
external ScheduleBuilder timeZone(String timeZone);

/// Event handler that fires every time a schedule occurs.
external CloudFunction onRun(
dynamic handler(EventContext context));
Expand Down
7 changes: 5 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ dependencies:
meta: ^1.1.8
node_interop: ^1.0.3
node_io: ^1.0.1+2
node_http: ^1.0.0
firebase_admin_interop: ^2.0.0
node_http: ^1.0.1
# firebase_admin_interop: ^2.1.0
firebase_admin_interop:
path: /Users/adrian/Documents/DevSystem/projects/opensource/firebase-admin-interop


dev_dependencies:
test: ^1.12.0