File tree Expand file tree Collapse file tree 8 files changed +16
-16
lines changed Expand file tree Collapse file tree 8 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ npm i @winglibs/sns
17
17
``` js
18
18
bring sns;
19
19
20
- let client = new sns.MobileClient ();
20
+ let client = new sns.MobileNotifications ();
21
21
22
22
test " sending an SMS" {
23
23
client .publish (PhoneNumber: " +14155552671" , Message: " Hello" );
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ bring cloud;
2
2
bring "./types.w" as types;
3
3
bring aws;
4
4
5
- pub class MobileClient_aws impl types.IMobileClient {
5
+ pub class MobileNotifications_aws impl types.IMobileNotifications {
6
6
pub inflight publish(options: types.PublishOptions): types.PublishResult {
7
- return MobileClient_aws ._publish(options);
7
+ return MobileNotifications_aws ._publish(options);
8
8
}
9
9
10
10
pub onLift(host: std.IInflightHost, ops: Array<str>) {
Original file line number Diff line number Diff line change 1
1
bring "./lib.w" as sns;
2
2
3
- let client = new sns.MobileClient ();
3
+ let client = new sns.MobileNotifications ();
4
4
5
5
test "will send an SMS" {
6
6
client.publish(PhoneNumber: "+14155552671", Message: "Hello");
Original file line number Diff line number Diff line change @@ -3,24 +3,24 @@ bring "./types.w" as types;
3
3
bring "./sim.w" as sim;
4
4
bring "./aws.w" as aws;
5
5
6
- /// MobileClient is a client for interacting with SNS mobile service.
6
+ /// MobileNotifications is a client for interacting with SNS mobile service.
7
7
/// No cloud resources are created when using this class.
8
8
/// When running the simulator in a non test environment, it will use the
9
9
/// actual cloud implementation.
10
- pub class MobileClient impl types.IMobileClient {
11
- inner: types.IMobileClient ;
10
+ pub class MobileNotifications impl types.IMobileNotifications {
11
+ inner: types.IMobileNotifications ;
12
12
new() {
13
13
let target = util.env("WING_TARGET");
14
14
if target == "sim" {
15
15
if std.Node.of(this).app.isTestEnvironment {
16
- this.inner = new sim.MobileClient_sim ();
16
+ this.inner = new sim.MobileNotifications_sim ();
17
17
} else {
18
- this.inner = new aws.MobileClient_aws ();
18
+ this.inner = new aws.MobileNotifications_aws ();
19
19
}
20
20
} elif target == "tf-aws" {
21
- this.inner = new aws.MobileClient_aws ();
21
+ this.inner = new aws.MobileNotifications_aws ();
22
22
} elif target == "awscdk" {
23
- this.inner = new aws.MobileClient_aws ();
23
+ this.inner = new aws.MobileNotifications_aws ();
24
24
} else {
25
25
throw "Unsupported target {target}";
26
26
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @winglibs/sns" ,
3
3
"description" : " Wing library for interacting with AWS SNS" ,
4
- "version" : " 0.0.3 " ,
4
+ "version" : " 0.1.0 " ,
5
5
"repository" : {
6
6
"type" : " git" ,
7
7
"url" : " https://github.com/winglang/winglibs.git" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ bring cloud;
2
2
bring util;
3
3
bring "./types.w" as types;
4
4
5
- pub class MobileClient_sim impl types.IMobileClient {
5
+ pub class MobileNotifications_sim impl types.IMobileNotifications {
6
6
store: cloud.Bucket;
7
7
new() {
8
8
this.store = new cloud.Bucket() as "Inbox";
Original file line number Diff line number Diff line change @@ -16,6 +16,6 @@ pub struct PublishResult {
16
16
SequenceNumber: str?;
17
17
}
18
18
19
- pub interface IMobileClient {
19
+ pub interface IMobileNotifications {
20
20
inflight publish(options: PublishOptions): PublishResult;
21
21
}
You can’t perform that action at this time.
0 commit comments