Skip to content

Commit

Permalink
Merge pull request #22 from namecheap/feature/fetchAppsByDiscoveryMet…
Browse files Browse the repository at this point in the history
…adata
  • Loading branch information
Volodymyr Makukha authored Jun 11, 2021
2 parents c511d27 + 27b34f7 commit 6e4f447
Show file tree
Hide file tree
Showing 8 changed files with 494 additions and 3 deletions.
21 changes: 21 additions & 0 deletions doc/registry_api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Registry Api

Sometimes can be necessary to work with ILC Registry API.
Of course, you can do it via HTTP directly, but we recommend doing it via class RegistryApi which provides convenient capabilities to work with ILC Registry, e.g. retrieve some data, etc.

### discoverApps
`discoverApps` can by useful for instance when you use [Parcels](https://github.com/namecheap/ilc/blob/1a864a41c7717d2d33156ec5d261d064f92afc63/docs/parcels.md).
Instead of hardcode app names - you can group apps with some keywords (discoveryMetadata), retrieve in runtime via `discoverApps` and render them.

```javascript
import { RegistryApi } from 'ilc-sdk';

const registryOrigin = 'http://localhost:4001';
const registryApi = new RegistryApi(registryOrigin);

// retrieve apps by discoveryMetadata field which should be rendered at some specific place
registryApi.discoverApps({ greatestApp: true })
.then(apps => {
console.log(apps);
});
```
207 changes: 204 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6e4f447

Please sign in to comment.