diff --git a/packages/smart-events-management-sdk/README.md b/packages/smart-events-management-sdk/README.md index 30df65a5..692031d6 100644 --- a/packages/smart-events-management-sdk/README.md +++ b/packages/smart-events-management-sdk/README.md @@ -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