@@ -8,20 +8,20 @@ NodeJS client used to interface with Portfolio APIs.
88
99` npm i @jsextonn/portfolio-api-client `
1010
11- Note: Version ` 0.1.x ` is not distributed with minified version.
11+ Note: Package is currently not distributed with minified version.
1212
1313## Usage
1414
1515### Contact Message Creation
1616
1717``` ts
1818import {
19- contact ,
19+ portfolio ,
2020 Reason ,
2121 CreateContactMessageRequest ,
2222} from " @jsextonn/portfolio-api-client" ;
2323
24- const client = contact ();
24+ const client = portfolio ();
2525
2626const request: CreateContactMessageRequest = {
2727 body: {
@@ -36,11 +36,63 @@ const request: CreateContactMessageRequest = {
3636};
3737
3838// The response entity returned from the web service
39- const response = await client .messages . create (request );
39+ const response = await client .contact . createMessage (request );
4040
4141// The response body
4242const responseBody = response .data ;
4343
44- // The newly created message
44+ // The newly created message, if successful
45+ const message = responseBody .data ;
46+ ```
47+
48+ ### Login
49+
50+ ``` ts
51+ import { portfolio , LoginRequest } from " @jsextonn/portfolio-api-client" ;
52+
53+ const client = portfolio ();
54+
55+ const request: LoginRequest = {
56+ body: {
57+ username: " username" ,
58+ password: " password" ,
59+ },
60+ };
61+
62+ // The response entity returned from the web service
63+ const response = await client .security .login (request );
64+
65+ // The response body
66+ const responseBody = response .data ;
67+
68+ // The authentication tokens, if successful
69+ const message = responseBody .data ;
70+ ```
71+
72+ ### Confirm Account
73+
74+ ``` ts
75+ import {
76+ portfolio ,
77+ UpdatePasswordRequest ,
78+ } from " @jsextonn/portfolio-api-client" ;
79+
80+ const client = portfolio ();
81+
82+ const request: UpdatePasswordRequest = {
83+ body: {
84+ username: " username" ,
85+ oldPassword: " oldPassword" ,
86+ newPassword: " newPassword" ,
87+ },
88+ };
89+
90+ // The response entity returned from the web service
91+ const response = await client .security .confirmAccount (request );
92+
93+ // The response body
94+ const responseBody = response .data ;
95+
96+ // The authentication tokens, if successful
4597const message = responseBody .data ;
4698```
0 commit comments