3.0.0 • Published 2 months ago

@sonicgarden/firebase-pi-count v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

firebase-pi-count

Privacy Information for Firebase Cloud Functions

Installation

npm install --save @sonicgarden/firebase-pi-count
// or
yarn add @sonicgarden/firebase-pi-count

Usage

import { defineSecret } from 'firebase-functions/params';
import { piCount } from '@sonicgarden/firebase-pi-count';

export piCount = functions
  .runWith({ secrets: ['KINTONE_API_TOKEN'] })
  .region('asia-northeast1')
  .pubsub.schedule('0 0 1 * *')
  .timeZone('Asia/Tokyo')
  .onRun(async () => {
    const count = await fetch('.....');
    // トークンはシークレットマネージャーで管理
    const token = defineSecret('KINTONE_API_TOKEN').value();
    await piCount({
      kintoneApiToken: token,
      data: {
        name: 'your project name',
        count,
        platform: 'firebase',
        isImportantPrivateInfo: true,
        paymentSystemName: 'stripe',
      }
    })
  });

Parameters

parameterrequireddefault valuenote
kintoneApiTokenyeskintone api access token
datayesfunctions that return data

npm publish

git tag -a v1.0.0 -m "My first version v1.0.0"
git push origin tags/v1.0.0
npm publish --access=public

update

npm version patch # or minor or magor
git push origin tags/v1.0.1
npm publish --access=public
3.0.0

2 months ago

2.0.1

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago