Skip to content

Commit 23a2450

Browse files
author
Kewin Polok
committed
Update README.md
1 parent 2b7ca2f commit 23a2450

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ npm install smsapi --save
99
## Example
1010

1111
```ts
12-
import { SMSAPI, MessageResponse } from 'smsapi';
12+
import { SMSAPI } from 'smsapi';
1313

1414
const smsapi = new SMSAPI('oAuthToken');
1515

16-
const response = async (): Promise<MessageResponse> => {
17-
return await smsapi.sms.sendSms('+48605xxxxxx', 'My first message!');
18-
};
16+
try {
17+
const result = await smsapi.sms.sendSms('+48605xxxxxx', 'My first message!');
18+
19+
console.log(result);
20+
} catch (err) {
21+
console.log(err);
22+
}
1923
```
2024

2125
## Supported modules

0 commit comments

Comments
 (0)