Skip to content
This repository was archived by the owner on Feb 18, 2021. It is now read-only.

Commit 8e9b5ab

Browse files
committed
Initial commit
0 parents  commit 8e9b5ab

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Portfolio API NodeJS Client
2+
3+
NodeJS client used to interface with Portfolio APIs.
4+
5+
## Usage
6+
7+
### Contact Message Creation
8+
9+
```ts
10+
import {
11+
contact,
12+
Reason,
13+
CreateContactMessageRequest,
14+
} from "portfolio-api-client";
15+
16+
const client = contact();
17+
18+
const request: CreateContactMessageRequest = {
19+
body: {
20+
message: "...",
21+
reason: Reason.Question,
22+
sender: {
23+
alias: "...",
24+
phone: "...",
25+
email: "...",
26+
},
27+
},
28+
};
29+
30+
// The response entity returned from the web service
31+
const response = await client.messages.create(request);
32+
33+
// The response body
34+
const responseBody = response.data;
35+
36+
// The newly created message
37+
const message = responseBody.data;
38+
```

0 commit comments

Comments
 (0)