fqapi-ts-test v0.0.10
Flotiq API TypeScript SDK
flotiq-api-ts is a package that installs a personalized SDK for Flotiq based on flotiq-codegen-ts. This package includes all the necessary TypeScript bindings to interact with the Flotiq API directly from your project.
For more details on the underlying SDK, visit the repository: flotiq-codegen-ts.
Requirements
In order to install and use this package, the project must have an environment variable defined for the Flotiq API key. This can be provided in one of the following ways:
- Define
FLOTIQ_API_KEYin a.envor.env.localfile in the project root. - Set the
FLOTIQ_API_KEYenvironment variable in your system.
The API key is necessary for installing SDK package related to your Content Type Definitions in Flotiq.
Installation
To install the package, run the following command in your project:
yarn add flotiq-api-tsUsage
Once installed, you can import and use the FlotiqApi to interact with the Flotiq API:
import { FlotiqApi } from "flotiq-api-ts";
// Example of usage
const flotiq = new FlotiqApi();Make sure that you have your FLOTIQ_API_KEY correctly set before making any requests.
Development
To develop package, install dependencies and run yarn install
- Create
.envfile withFLOTIQ_API_KEY=__YOUR_FLOTIQ_API_KEY__ - Run
npm installcommand, this will fire postinstall script - In root directory there is
./flotiqApisdk
Publishing
Run:
npm login
npm publish