Quick Start

Introduction

The @postiva/client is a simple and easy to use SDK for Postiva API. It provides a set of methods to interact with the API and it's built with Typescript.

  • Easy to Use: It is designed to be simple and easy to use.
  • Type Safety: It is built with TypeScript to ensure type safety.
  • Developer-Friendly: It is designed to be developer-friendly and easy to use.

Setup

Install

npm install @postiva/client

Envrionment Variables

Create a .env file in the root of your project and add the following:

Info

For access to your API key and workspace ID, sign up on our platform. You can locate your workspace ID via the account settings once you're registered.

.env
NEXT_PUBLIC_POSTIVA_API_KEY=your-api-key
NEXT_PUBLIC_WORKSPACE_ID=your-workspace-id

Initialize Client

libs/postiva.ts
import {  } from '@postiva/client';

export const  = ({
  : ..,
  : ..,
});

Parameters

PropTypeDefault
apiKey
string
-
workspaceId
string
-
options
PostivaClientOptions
-