Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Valexr committed May 30, 2022
1 parent 094f358 commit dcc2109
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ const providersMap = await optimadeClient.getProviders(); // { [id: string]: Pro

const providerIds = Object.keys(providersMap); // string[]

const results = await optimadeClient.getStructuresAll(
providerIds,
YOUR_OPTIMADE_QUERY,
); // [StructuresResponse[], Provider][]
const results = await optimadeClient.getStructuresAll({
providers: Provider[],
filter: YOUR_OPTIMADE_QUERY,
}); // [StructuresResponse[], Provider][]
```

Importing depends on your environment. See also the `examples` folder. The
Expand All @@ -79,12 +79,13 @@ const optimadeClient = new Optimade({
optimadeClient.providers = prefetched.providers;
optimadeClient.apis = prefetched.apis;

const results = await optimadeClient.getStructuresAll(
providerIds,
YOUR_OPTIMADE_QUERY,
const results = await optimadeClient.getStructuresAll({
providers: Provider[],
filter: YOUR_OPTIMADE_QUERY,
page: number,
limit: number
); // [StructuresResponse[], Provider][]
limit: number,
offset: number
}); // [StructuresResponse[], Provider][]
```

See also the `demo` folder.
Expand Down

0 comments on commit dcc2109

Please sign in to comment.