Add CIDs to a Group
Usage
import { PinataSDK } from "pinata-web3";
const pinata = new PinataSDK({
pinataJwt: process.env.PINATA_JWT!,
pinataGateway: "example-gateway.mypinata.cloud",
});
const group = await pinata.groups.addCids({
groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
cids: ["QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng"],
});
Returns
Parameters
groupId
ID of the target Group to add files to
const group = await pinata.groups.addCids({
groupId: "3778c10d-452e-4def-8299-ee6bc548bdb0",
});
cids
An array of CIDs as strings that you want to add to the group
const group = await pinata.groups.addCids({
cids: [
"QmVLwvmGehsrNEvhcCnnsw5RQNseohgEkFNN1848zNzdng",
"bafkreih5aznjvttude6c3wbvqeebb6rlx5wkbzyppv7garjiubll2ceym4"
],
});