From f77af25b844abb8124aabb1048fce37be8d4e8b3 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 22 Mar 2024 18:12:07 -0400 Subject: [PATCH] feat: add pinStatus api --- src/client.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/client.ts b/src/client.ts index 3aad883..e843b5e 100644 --- a/src/client.ts +++ b/src/client.ts @@ -22,7 +22,7 @@ import { getS5AccountPins, getS5BlobCid, getS5DownloadCid, - getS5MetadataCid, + getS5MetadataCid, getS5PinCidStatus, getS5Registry, postS5PinCid, postS5Registry, postS5Upload, @@ -748,4 +748,14 @@ export class S5Client { await deleteS5DeleteCid(cid, config); } + + public async pinStatus(cid: string, customOptions: CustomPinOptions = {}) { + const config = optionsToConfig( + this, + DEFAULT_PIN_OPTIONS, + customOptions, + ); + + return await getS5PinCidStatus(cid, config); + } }