0.1.1 • Published 7 years ago

@titicaca/firebase-remote-config-client v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

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: 'some@example.com',
      private_key: 'PRIVATE_KEY'
    }
  })

  console.log(body)
}

async function update() {
  const { body, etag, status } = await fetchConfig({
    accountManifest: {
      client_email: 'some@example.com',
      private_key: 'PRIVATE_KEY'
      key: 'foo',
      value: 'bar'
    }
  })

  console.log(body) /* Has "foo": { "defaultValue": "bar" } */
}