# remoteflags-nodejs-client

> Remote Flags nodejs client. Access Public API for integration with Remote Flags.

Latest version **1.0.9** (published 2022-08-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install remoteflags-nodejs-client
pnpm add remoteflags-nodejs-client
yarn add remoteflags-nodejs-client
bun add remoteflags-nodejs-client
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2022-08-17 |
| First published | 2022-02-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 58.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | remoteflags |
| Maintainers | miguelcs, luiscrs14 |
| Keywords | remoteflags, feature flag, feature toggle, flag, toggle, sdk, nodejs |

## Links

- npm: https://www.npmjs.com/package/remoteflags-nodejs-client
- Repository: https://github.com/remoteflags/remoteflags-nodejs-client
- Homepage: http://www.remoteflags.com
- Issues: https://github.com/remoteflags/remoteflags-nodejs-client/issues
- npm.io page: https://npm.io/package/remoteflags-nodejs-client

## Dependencies (2)

- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.0.0
- [superagent](https://npm.io/package/superagent.md) ^5.3.0

## Recent versions

- 1.0.9 (latest) — 2022-08-17
- 1.0.7 — 2022-05-09
- 1.0.6 — 2022-03-01
- 1.0.5 — 2022-02-28
- 1.0.4 — 2022-02-28
- 1.0.3 — 2022-02-08
- 1.0.2 — 2022-02-07
- 1.0.1 — 2022-02-04
- 1.0.0 — 2022-02-04

## README

<br/>

![alt text](https://s3.eu-west-1.amazonaws.com/www.remoteflags.com/Header.png)

# remoteflags-nodejs-client
[![npm version](https://img.shields.io/npm/v/remoteflags-nodejs-client)](https://www.npmjs.com/package/remoteflags-nodejs-client)

[Remote Flags](https://www.remoteflags.com) nodejs sdk to integrate with Public API to fetch flag status.

For more information on usage checkout our [Docs](https://www.remoteflags.com/docs) page!

## Installation
#### npm

Install it via:

```shell
npm install remoteflags-nodejs-client --save
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript

const client = require('remoteflags-nodejs-client');
client.ApiClient.instance.authentications['RemoteFlagsAuthorizer'].apiKey = "<YOUR_API_KEY>";
const api = new client.PublicApi()

const ownerId = "<YOUR_OWNER_ID>"; // {String} OwnerID to fetch status for
const flagId = "<YOUR_FLAG_ID>"; // {String} FlagId to fetch status for

// optional parameters
const opts = {
  'segment': "status", // {String} The segment to get status from. Required for multi-segment flags. For single segment flag skip this.
  'key': "key_example" // {String} An identifier to be a key to associate the status with. This is used on flag which status you need to be consistent after the first random generated. For always random status behavior skip this.
};
api.getStatus(ownerId, flagId, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


```

## Documentation for API Endpoints

All URIs are relative to *https://api.remoteflags.com*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*RemoteflagsNodejsClient.PublicApi* | [**devToggleIdOptions**](docs/PublicApi.md#devToggleIdOptions) | **OPTIONS** /dev-toggle/{id} | 
*RemoteflagsNodejsClient.PublicApi* | [**get1ClickStatus**](docs/PublicApi.md#get1ClickStatus) | **GET** /dev-toggle/{id} | Get a flag status for 1 click toggle.
*RemoteflagsNodejsClient.PublicApi* | [**getFlagUsage**](docs/PublicApi.md#getFlagUsage) | **GET** /usage/owner/{ownerId}/flag/{flagId} | Get a flag usage data.
*RemoteflagsNodejsClient.PublicApi* | [**getOwnerUsage**](docs/PublicApi.md#getOwnerUsage) | **GET** /usage/owner/{ownerId} | Get usage data for an owner.
*RemoteflagsNodejsClient.PublicApi* | [**getStatus**](docs/PublicApi.md#getStatus) | **GET** /status/owner/{ownerId}/flag/{flagId} | Get a flag status.
*RemoteflagsNodejsClient.PublicApi* | [**statusOwnerOwnerIdFlagFlagIdOptions**](docs/PublicApi.md#statusOwnerOwnerIdFlagFlagIdOptions) | **OPTIONS** /status/owner/{ownerId}/flag/{flagId} | 
*RemoteflagsNodejsClient.PublicApi* | [**usageOwnerOwnerIdFlagFlagIdOptions**](docs/PublicApi.md#usageOwnerOwnerIdFlagFlagIdOptions) | **OPTIONS** /usage/owner/{ownerId}/flag/{flagId} | 
*RemoteflagsNodejsClient.PublicApi* | [**usageOwnerOwnerIdOptions**](docs/PublicApi.md#usageOwnerOwnerIdOptions) | **OPTIONS** /usage/owner/{ownerId} | 


## Documentation for Models

 - [RemoteflagsNodejsClient.Status](docs/Status.md)
 - [RemoteflagsNodejsClient.Usage](docs/Usage.md)
 - [RemoteflagsNodejsClient.UsageRequestInner](docs/UsageRequestInner.md)


## Documentation for Authorization



### RemoteFlagsAuthorizer


- **Type**: API key
- **API key parameter name**: authorizationToken
- **Location**: HTTP header

---
_Source: https://npm.io/package/remoteflags-nodejs-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
