Skip to content

Commit 20fae2b

Browse files
Add example
1 parent ae23089 commit 20fae2b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { ClientConfiguration, EnvironmentRepository } from "../../../src/index";
2+
import { CreateClient } from "../utility";
3+
4+
const main = async () => {
5+
6+
const configuration: ClientConfiguration = {
7+
userAgentApp: "examples",
8+
instanceURL: "http://localhost:5000", // required
9+
apiKey: "API-DONTCOMMITTHEKEY", // required
10+
};
11+
12+
const client = await CreateClient(configuration);
13+
14+
const environmentsRepo = new EnvironmentRepository(client, "Default");
15+
16+
const environments = await environmentsRepo.list();
17+
18+
environments.Items.map(env => console.log(` - ${env.Name} (ID: ${env.Id})`));
19+
};
20+
21+
main();

0 commit comments

Comments
 (0)