-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from namecheap/feature/fetchAppsByDiscoveryMet…
…adata
- Loading branch information
Showing
8 changed files
with
494 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.