Skip to content

Commit e6a8459

Browse files
authored
Merge pull request #83 from lob/chore/readme-pre-release-updates
docs(readme): updates in prior to publish
2 parents 864e714 + 9bd57d9 commit e6a8459

File tree

1 file changed

+50
-18
lines changed

1 file changed

+50
-18
lines changed

README.md

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# lob-typescript-sdk
22

3-
Typescript SDK for the [Lob.com](https://lob.com) API. See full Lob.com API documentation [here](https://lob.com/docs/node). For best results, be sure that you're using [the latest version](https://lob.com/docs/node#version) of the Lob API and the latest version of the Node wrapper.
3+
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
4+
5+
Typescript SDK for the [Lob.com](https://lob.com) API. See the full Lob.com API documentation [here](https://docs.lob.com).
46

57
## Getting Started
68

@@ -15,9 +17,7 @@ Once you have created an account, you can access your API Keys from the [Setting
1517
lob-typescript-sdk can be installed through the npm:
1618

1719
```bash
18-
# FOR PRE PUBLISH ALPHA TESTING ONLY!!!!!
19-
# UPDATE BEFORE PUBLISHING
20-
$ npm i https://github.com/lob/lob-typescript-sdk
20+
$ npm i @lob/lob-typescript-sdk
2121
```
2222

2323
## Examples
@@ -30,17 +30,20 @@ const config: Configuration = new Configuration({
3030
username: "<<YOUR API KEY HERE>>",
3131
});
3232

33-
const addressCreate: AddressEditable = {
34-
name: "Thing T. Thing",
35-
address_line1: "1313 CEMETERY LN",
36-
address_city: "WESTFIELD",
37-
address_state: "NJ",
38-
address_zip: "07090",
39-
};
33+
const addressApi = new AddressesApi(config);
34+
4035
try {
41-
const myAddress = await new AddressesApi(config).create(addressCreate);
42-
const myAddressFromApi = await new AddressesApi(config).get(myAddress.id);
43-
const response = await new AddressesApi(config).list();
36+
const addressCreate = new AddressEditable({
37+
name: "Thing T. Thing",
38+
address_line1: "1313 CEMETERY LN",
39+
address_city: "WESTFIELD",
40+
address_state: "NJ",
41+
address_zip: "07090",
42+
});
43+
44+
const myAddress = await addressApi.create(addressCreate);
45+
const myAddressFromApi = await addressApi.get(myAddress.id);
46+
const addressList = await addressApi.list();
4447
} catch (err: any) {
4548
console.error(err);
4649
}
@@ -50,11 +53,18 @@ try {
5053

5154
The full and comprehensive documentation of Lob's APIs is available [here](https://docs.lob.com/).
5255

53-
## Contributing
56+
## Supported Node.js Versions
57+
58+
Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
59+
This package is compatible with all current _active_ and _maintenance_ versions of
60+
Node.js. If you are using a version that is not listed as an _active_ or _maintenance_ version we recommend that you switch to an actively supported LTS version.
61+
62+
Any support or compatability with versions of Node.js not listed as _active_ or _maintenance_ is on a
63+
best-efforts basis.
5464

55-
<<<< UPDATE BEFORE PUBLISHING >>>>
65+
## Contributing
5666

57-
To contribute, please see the CONTRIBUTING.md file.
67+
To contribute, please see the [Contributing.md](https://github.com/lob/lob-typescript-sdk/blob/main/.github/Contributing.md) file.
5868

5969
## Testing
6070

@@ -68,8 +78,30 @@ $ npm test
6878

6979
### Integration Tests
7080

71-
Running integration tests requires multiple valid API keys with access to specific features. As such, it is not expected that these tests will pass for every user in every environment.
81+
Integration tests run against a live deployment of the Lob API and require multiple valid API keys with access to specific features. As such, it is not expected that these tests will pass for every user in every environment.
82+
83+
To run integration tests:
7284

7385
```bash
7486
$ LOB_API_KEY=<<API KEY 1>> LOB_LIVE_API_KEY=<< API KEY 2>> npm run test:integration
7587
```
88+
89+
#### A cleaner alternative if you are going to run integration tests frequently
90+
91+
Run this the first time:
92+
93+
```bash
94+
$ echo "LOB_API_KEY=<<API KEY 1>>\nLOB_LIVE_API_KEY=<< API KEY 2>>" > LOCAL.env
95+
```
96+
97+
Then, to run the integration tests:
98+
99+
```bash
100+
$ env $(cat LOCAL.env) npm run test:integration
101+
```
102+
103+
=======================
104+
105+
Copyright © 2022 Lob.com
106+
107+
Released under the MIT License, which can be found in the repository in [LICENSE.txt](https://github.com/lob/lob-typescript-sdk/blob/main/LICENSE.txt).

0 commit comments

Comments
 (0)