wildfire-api-client
v1.1.1
Published
A client to interact with the Wildfire API
Downloads
72
Readme
wildfire-api-client
wildfire-api-client
is a client library for interacting with the Wildfire API. It also includes a CLI tool that can be used as an npm script in your project.
Installation
npm install wildfire-api-client
Environment Variables
To use the Wildfire API client and CLI, you need to set the following environment variables:
WILDFIRE_APP_ID
: Your application ID for accessing the Wildfire API.WILDFIRE_APP_SECRET
: Your application secret for accessing the Wildfire API.WILDFIRE_ADMIN_APP_ID
: Your admin application ID for accessing the Wildfire API.WILDFIRE_ADMIN_APP_SECRET
: Your admin application secret for accessing the Wildfire API.
Setting Environment Variables
You can set these environment variables in your shell configuration file (e.g., .bashrc
, .zshrc
):
export WILDFIRE_APP_ID=your_app_id
export WILDFIRE_APP_SECRET=your_app_secret
export WILDFIRE_ADMIN_APP_ID=admin_app_id
export WILDFIRE_ADMIN_APP_SECRET=admin_app_secret
Alternatively, you can use a .env
file with the dotenv
package for the client and dotenv-cli
for the CLI:
Install
dotenv
anddotenv-cli
:npm install dotenv npm install -g dotenv-cli
Create a
.env
file in your project root:WILDFIRE_APP_ID=your_app_id WILDFIRE_APP_SECRET=your_app_secret WILDFIRE_ADMIN_APP_ID=admin_app_id WILDFIRE_ADMIN_APP_SECRET=admin_app_secret
Load the environment variables in your client code:
require('dotenv').config(); const wildfireApiClient = require('wildfire-api-client');
Run the CLI with
dotenv
:dotenv -e .env -- npm run wildfire
For more detailed documentation, refer to the Wildfire Client Documentation in the docs folder.
Usage
Client Library
const wildfireApiClient = require('wildfire-api-client');
// ...existing code...
CLI Tool
You can use the CLI tool by adding it to your npm scripts in package.json:
{
"scripts": {
"wildfire": "wildfire-api-client-cli"
}
}
Then, you can run the CLI tool using:
npm run wildfire
For more detailed documentation, refer to the Wildfire Client Documentation in the docs folder.