# brickverse

> API library for interacting with brickverse.gg api.

Latest version **1.1.1** (published 2024-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install brickverse
pnpm add brickverse
yarn add brickverse
bun add brickverse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2024-02-03 |
| First published | 2022-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 21.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | rampagecorp |
| Maintainers | vq9o |
| Keywords | brickverse, api, library |

## Links

- npm: https://www.npmjs.com/package/brickverse
- Repository: https://github.com/BrickVerse-co/BrickVerse-NPM-Module
- Homepage: https://www.brickverse.gg
- Issues: https://github.com/BrickVerse-co/BrickVerse-NPM-Module/issues
- Funding: https://www.patreon.com/metatable
- npm.io page: https://npm.io/package/brickverse

## Dependencies (4)

- [axios](https://npm.io/package/axios.md) ^1.6.7
- [assert](https://npm.io/package/assert.md) ^2.1.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [@types/axios](https://npm.io/package/@types/axios.md) ^0.14.0

## Recent versions

- 1.1.1 (latest) — 2024-02-03
- 1.1.0 — 2024-02-03
- 1.0.9 — 2024-02-03
- 1.0.8 — 2023-12-05
- 1.0.7 — 2023-11-25
- 1.0.6 — 2023-11-07
- 1.0.5 — 2023-11-01
- 1.0.4 — 2023-10-24
- 1.0.3 — 2022-05-27
- 1.0.2 — 2022-05-26
- 1.0.1 — 2022-05-26

## README

# Installation
Open command line and type: ``npm install brickverse``

# Documentation
## NPM Package
https://developers.brickverse.gg/npm-module/introduction

## Web API
https://developers.brickverse.gg/npm-module/web-api

# Links
## GitHub 
https://github.com/BrickVerse-co/OpenCloud-NPM

## NPM Package
https://www.npmjs.com/package/brickverse

# Example
```js
const { WebAPIClient, OpenCloudClient, ThumbnailClient,WorldClient, OCDatabase, OCENV, OCWebhooks } = require("brickverse");

const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';
const worldId = 1;
const key = "CoolDatabaseKey";
const IsBot = true;

let OpenCloud = new OpenCloudClient(apiKey, apiSecret);
let WebAPI = new WebAPIClient();

console.log(await ThumbnailClient.GetAssetThumbnail(1));
console.log(await ThumbnailClient.GetUserThumbnail(1, "player_head"));
console.log(await OCDatabase.GetAsync(worldId, key));

await OCDatabase.SetAsync(worldId, key, {
    cool_json: true
});

console.log(await OCENV.GetAsync(worldId, key));
console.log(await WorldClient.GetWorldTree(worldId));

await OCENV.SetAsync(worldId, key, "CoolFFlagOrSuperDuperSecret");

OCWebhooks.on('RightToErasure', (payload) => {
    console.log('Received RightToErasure event: ', payload);
    
    // Implement your erasure logic here
});

WebAPI.login(process.env.BRICKVERSE_SECURITY_TOKEN, IsBot).then(async() => {
    await WebAPI.SendFriendRequest(1);
});

OCWebhooks.listen();
```

# Maintainers
This library is maintained by engineers from the BrickVerse Engineering & Research Division, please use issue sections to report bugs on GitHub.

[![](https://data.jsdelivr.com/v1/package/npm/brickverse/badge)](https://www.jsdelivr.com/package/npm/brickverse)

---
_Source: https://npm.io/package/brickverse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
