0.0.3 • Published 1 year ago

@fireberry/sdk v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Fireberry SDK

Overview

Welcome to the Fireberry SDK! This software development kit (SDK) is designed to help developers who are looking to integrate Fireberry into their application. This guide will provide you with the necessary information to get started.

Features

  • Get current record: Using FireberryApi module you can fetch the current record.
  • Feature 2: Description of the second feature.
  • Feature 3: Description of the third feature.
  • ...

Installation

To integrate Fireberry SDK into your project, follow these simple steps:

  1. URL params: The SDK uses recordType and recordId url params, make sure you don't overrides them.
  2. tokenId variable: On dev mode only, pass the tokenId as a config to the FireberrySDK instance. Pay attention: In production, the SDK will use the cookie as an authentication, and not the token
  3. node env variable: Add to your .env file a NODE_ENV param: NODE_ENV=development

How to use

 const [record, setRecord] = useState(null);

  useEffect(() => {
    const fbSDK = new FireberrySDK({
      tokenId: "YOUR DEVELOPMENT ONLY TOKEN",
    });
    fbSDK.context.record.all().then((record) => {
      setRecord(record);
    });
  }, []);
0.0.3

1 year ago

0.0.2

1 year ago