Skip to content

Commit

Permalink
fix: remove invalid example
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki authored Aug 8, 2022
1 parent 2be7175 commit e554d44
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions packages/smart-events-management-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,3 @@ RHOAS Smart Events Management TypeScript/JavaScript SDK
```
npm install @rhoas/smart-events-management-sdk --save
```

#### Usage

```ts
import { Configuration, ConnectorsApi, getErrorCode, isServiceApiError, APIErrorCodes } from "@rhoas/smart-events-management-sdk";

const accessToken = process.env.CLOUD_API_TOKEN;
const basePath = "https://api.openshift.com";

const apiConfig = new Configuration({
accessToken,
basePath
})

const connectorsApi = new ConnectorsApi(apiConfig)

connectorsApi.getConnector("id", "kafka-id").then((data) => {
console.log(data?.data)
}).catch((err) => {
if(isServiceApiError(err)){
console.error("Validation issue", getErrorCode(err) == APIErrorCodes.ERROR_8)
}
})
```


See [./examples](https://github.com/redhat-developer/app-services-sdk-js/tree/main/examples) for full example

0 comments on commit e554d44

Please sign in to comment.