@imxiaomi/gem-sdk
v0.1.11-alpha.3
Published
General Entity Manager SDK (Development) ======
Downloads
6
Readme
General Entity Manager SDK (Development)
Install
npm i @imxiaomi/gem-sdk
Get started
// example/demo/
import DomainSDK from "@imxiaomi/gem-sdk"
const sdk = new DomainSDK({
baseUrl: 'http://gem.project.ci/domain-api',
domainId: 'xxx',
clientId: 'yyy',
clientSecret: 'zzz'
})
const records = await sdk.queryRecords('person', 'name = Master')
console.log(records)
Tutorial
query records by using entity sdk. More examples please see demo
const entity = new EntitySDK(domainSDK, 'entityName')
const sdk = new DomainSDK(getDomainOptions())
const entity = new EntitySDK(sdk, 'person')
const records = await entity.queryRecords('name ~ Mister')
console.log(records)
// [{name: 'Mister', id: 'xxx'}, ...]
TQL Query Language
Please see TQL Spec