# firebase-admin-get-children-ids

> Get children ids at a given path in your firebase realtime database.

Latest version **0.1.11** (published 2019-05-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install firebase-admin-get-children-ids
pnpm add firebase-admin-get-children-ids
yarn add firebase-admin-get-children-ids
bun add firebase-admin-get-children-ids
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.11 |
| Published | 2019-05-14 |
| First published | 2018-08-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | rakannimer |
| Maintainers | rakannimer |

## Links

- npm: https://www.npmjs.com/package/firebase-admin-get-children-ids
- npm.io page: https://npm.io/package/firebase-admin-get-children-ids

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [google-auth-library](https://npm.io/package/google-auth-library.md) ^1.6.1

## Recent versions

- 0.1.11 (latest) — 2019-05-14
- 0.1.10 — 2018-08-16
- 0.1.9 — 2018-08-16
- 0.1.8 — 2018-08-14
- 0.1.7 — 2018-08-14
- 0.1.6 — 2018-08-14
- 0.1.5 — 2018-08-07
- 0.1.4 — 2018-08-06
- 0.1.3 — 2018-08-06
- 0.1.2 — 2018-08-03
- 0.1.1 — 2018-08-03
- 0.1.0 — 2018-08-03
- 0.0.1 — 2018-08-03

## README

# Firebase Admin Get Children IDs

Get children ids at a given path in your firebase realtime database.

```javascript
const { getChildrenIDs } = require('firebase-admin-get-children-ids');
const firebase = require('firebase-admin');

const getUserIDs = async () => {
  const databaseURL = "<FIREBASE_DATABASE_URL>";
  const credential = require("./firebase-key.json");
  const userIDs = await getChildrenIDs('/users/', { firebase, credential, databaseURL });
  return userIDs;
}
```

This module is meant to run on node NOT on the browser or react-native.

Use this in your node server or on cli tools.

## Installation

```sh
  yarn add firebase-admin-get-children-ids
  # If you don't already have firebase-admin as a dependency then add it too
  yarn add firebase-admin
```


## Usage 

1. First you need a Private Key from firebase for privileged environments, find out how to get it here: https://firebase.google.com/docs/admin/setup (or replace YOUR_PROJECT_NAME_HERE with your project name here : https://console.firebase.google.com/project/YOUR_PROJECT_NAME_HERE/settings/serviceaccounts/adminsdk)

2. Place that private key .json file somewhere in your project.
3. Take note of your databaseURL

```javascript

// Import it in your project

import { getChildrenIDs } from 'firebase-admin-get-children-ids'
// Or
const { getChildrenIDs } = require('firebase-admin-get-children-ids')

// Import firebase-admin
import firebase from 'firebase-admin'
// Or
const firebase = require('firebase-admin')


// Use it

const getUserIDs = async () => {
  const databaseURL = "<FIREBASE_DATABASE_URL>";
  const credential = require("./firebase-key.json");
  const userIDs = await getChildrenIDs('/users/', { firebase, credential, databaseURL });
  return userIDs;
}

```

---
_Source: https://npm.io/package/firebase-admin-get-children-ids · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
