Skip to content

Commit d615a97

Browse files
authored
Improve README (#145)
This adds some info to the README.
1 parent 3e8ebc6 commit d615a97

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,45 @@ npm install @datadog/datadog-api-client
1818
yarn add @datadog/datadog-api-client
1919
```
2020

21-
## Usage
21+
## Getting Started
2222

23-
TBD
23+
Here's an example getting a monitor:
24+
25+
```typescript
26+
import { v1 } from 'datadog-api-client';
27+
import * as fs from 'fs';
28+
29+
const configuration = v1.createConfiguration();
30+
const apiInstance = new v1.MonitorsApi(configuration);
31+
32+
let params:v1.MonitorsApiGetMonitorRequest = {
33+
// number | The ID of the monitor
34+
monitorId: 1,
35+
// string | When specified, shows additional information about the group states. Choose one or more from `all`, `alert`, `warn`, and `no data`. (optional)
36+
groupStates: "group_states_example",
37+
};
38+
39+
apiInstance.getMonitor(params).then((data:any) => {
40+
console.log('API called successfully. Returned data: ' + data);
41+
}).catch((error:any) => console.error(error));
42+
43+
```
44+
45+
## Documentation
46+
47+
Documentation for API endpoints can be found under the docs subdirectories, in [v1](/docs/v1/)
48+
and [v2](/docs/v2/).
49+
50+
## Contributing
51+
52+
As most of the code in this repository is generated, we will only accept PRs for files
53+
that are not modified by our code-generation machinery (changes to the generated files
54+
would get overwritten). We happily accept contributions to files that are not autogenerated,
55+
such as tests and development tooling.
56+
57+
## Author
58+
59+
2460

2561
## License
2662

0 commit comments

Comments
 (0)