Skip to content

Commit 10217b1

Browse files
Bug Fixes:
* #169 * #158 * #151
1 parent fe087b7 commit 10217b1

File tree

4 files changed

+176
-190
lines changed

4 files changed

+176
-190
lines changed

docs/CallingPattern.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,45 @@ All calls to Microsoft Graph are chained together starting with **.api()**, then
44

55
## Path supports the following formats
66

7-
* `me`
8-
* `/me`
9-
* `https://graph.microsoft.com/v1.0/me`
10-
* `https://graph.microsoft.com/beta/me`
11-
* `me/events?$filter=startswith(subject, "Adventure")`
7+
- `me`
8+
- `/me`
9+
- `https://graph.microsoft.com/v1.0/me`
10+
- `https://graph.microsoft.com/beta/me`
11+
- `me/events?$filter=startswith(subject, "Adventure")`
1212

1313
## Promise based calling
1414

1515
Getting user details with `async`/`await`,
1616

1717
```typescript
1818
try {
19-
let res = await client.api("/me").get();
20-
console.log(res);
19+
let res = await client.api("/me").get();
20+
console.log(res);
2121
} catch (error) {
22-
throw error;
22+
throw error;
2323
}
2424
```
2525

2626
Getting user details with `then`/`catch`,
2727

2828
```typescript
2929
client
30-
.api('/me')
31-
.get()
32-
.then((res) => {
33-
console.log(res);
34-
}).catch((err) => {
35-
console.log(err);
36-
});
30+
.api("/me")
31+
.get()
32+
.then((res) => {
33+
console.log(res);
34+
})
35+
.catch((err) => {
36+
console.log(err);
37+
});
3738
```
3839

3940
## Callback based calling
4041

4142
Getting user details by passing `callback`,
4243

4344
```typescript
44-
client
45-
.api('/me')
46-
.get((err, res, rawResponse) => {
47-
console.log(res);
48-
});
45+
client.api("/me").get((err, res) => {
46+
console.log(res);
47+
});
4948
```

0 commit comments

Comments
 (0)