@titicaca/firebase-remote-config-client
v0.1.1
Published
Firebase remote config client
Downloads
18
Maintainers
Readme
Firebase Remote Config Client
Firebase Remote Config를 조회/갱신하는 클라이언트 라이브러리입니다.
Usage
$ npm install @titicaca/firebase-remote-config-client --save
import { fetchConfig, updateConfig } from '@titicaca/firebase-remote-config-client'
async function fetch() {
const { body, etag, status } = await fetchConfig({
accountManifest: {
client_email: '[email protected]',
private_key: 'PRIVATE_KEY'
}
})
console.log(body)
}
async function update() {
const { body, etag, status } = await fetchConfig({
accountManifest: {
client_email: '[email protected]',
private_key: 'PRIVATE_KEY'
key: 'foo',
value: 'bar'
}
})
console.log(body) /* Has "foo": { "defaultValue": "bar" } */
}