@fireberry/sdk
v0.0.3
Published
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.
Downloads
1
Readme
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:
- URL params: The SDK uses
recordType
andrecordId
url params, make sure you don't overrides them. - 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
- node env variable: Add to your
.env
file aNODE_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);
});
}, []);