Skip to content

Commit e061687

Browse files
authored
Merge pull request #10 from ActivitySmithHQ/docs/use-activitysmith-variable
docs: use activitysmith variable in README
2 parents 4e658c1 + 0d51071 commit e061687

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ ESM:
1919
```ts
2020
import ActivitySmith from "activitysmith";
2121

22-
const client = new ActivitySmith({
22+
const activitysmith = new ActivitySmith({
2323
apiKey: process.env.ACTIVITYSMITH_API_KEY,
2424
});
2525

2626
// Push Notifications
27-
await client.notifications.send({
27+
await activitysmith.notifications.send({
2828
// See PushNotificationRequest for fields
2929
});
3030

3131
// Live Activities
32-
await client.liveActivities.start({
32+
await activitysmith.liveActivities.start({
3333
// See LiveActivityStartRequest for fields
3434
});
3535
```
@@ -39,7 +39,7 @@ CommonJS:
3939
```js
4040
const ActivitySmith = require("activitysmith");
4141

42-
const client = new ActivitySmith({
42+
const activitysmith = new ActivitySmith({
4343
apiKey: process.env.ACTIVITYSMITH_API_KEY,
4444
});
4545
```
@@ -48,8 +48,8 @@ const client = new ActivitySmith({
4848

4949
The client exposes grouped resources:
5050

51-
- `client.liveActivities`
52-
- `client.notifications`
51+
- `activitysmith.liveActivities`
52+
- `activitysmith.notifications`
5353

5454
Each method is fully typed. Request and response types are included in the type definitions.
5555

0 commit comments

Comments
 (0)