Skip to content

Commit

Permalink
Remove DAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
leite08 committed May 18, 2024
1 parent 41a1fff commit b7922f0
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,39 +43,14 @@ const response = await metriport.medical.organization.create({
}
});

console.log('Received response from Metriport!', response);
```

## Medical API

The Medical APIs are scoped within the `medical` property of the client.
console.log('Organization creted at Metriport:', response);

```ts
import { MetriportClient } from "@metriport/api-sdk";

const metriport = new MetriportClient({
apiKey: 'YOUR_API_KEY',
});
// ...

const patient = await metriport.medical.patient.get("patientId");
```


## Devices API

At this time, to access the Devices API using our SDK please use the version 7.x.x - only the Medical API is available on the latest major version of this SDK (v8+).

The Devices API on v7.x:

```ts
import { MetriportDevicesApi } from "@metriport/api-sdk";

const metriport = new MetriportDevicesApi("YOUR_API_KEY");

const response = await metriport.getActivityData("metriportUserId", "2023-10-21");
```


## Handling errors

When the API returns a non-success status code (4xx or 5xx response), a subclass of [MetriportError](src/errors/MetriportError.ts) will be thrown:
Expand Down

0 comments on commit b7922f0

Please sign in to comment.