metafold
v0.6.0
Published
Metafold SDK for Node.js
Downloads
95
Readme
Metafold SDK for Node.js
[!IMPORTANT] Until the package is at major version one (1.x.x) the API should be considered unstable.
Installation
# npm
npm install metafold
# yarn
yarn add metafold
Usage
The SDK is compatible with both EMCAScript Modules (ESM) and CommonJS (legacy).
ECMAScript Modules
import MetafoldClient from "metafold"
CommonJS
const MetafoldClient = require("metafold")
Example
const accessToken = "..."
const projectID = "123"
const metafold = new MetafoldClient(accessToken, projectID)
assets = await metafold.assets.list()
console.log(assets[0].name)
asset = await metafold.assets.get("123")
console.log(asset.name)
Read the documentation for more info or play around with one of the examples.