Skip to main content

ResQ.Storage.PinMetadata

PinMetadata(string, string, long, DateTimeOffset, Dictionary<string,string>) Constructor

Represents metadata for a file pinned to IPFS.
public PinMetadata(string Cid, string Name, long SizeBytes, System.DateTimeOffset PinnedAt, System.Collections.Generic.Dictionary<string,string> KeyValues);

Parameters

Cid System.String The IPFS Content Identifier. Name System.String The human-readable name assigned to the pin. SizeBytes System.Int64 The size of the pinned content in bytes. PinnedAt System.DateTimeOffset UTC timestamp when the content was pinned. KeyValues System.Collections.Generic.Dictionary<System.String,System.String> Dictionary of custom metadata key-value pairs.

Example

var pins = await storageClient.ListPinsAsync("evidence-");
foreach (var pin in pins)
{
    Console.WriteLine($"{pin.Name}: {pin.Cid}");
    foreach (var kv in pin.KeyValues)
    {
        Console.WriteLine($"  {kv.Key}: {kv.Value}");
    }
}

Remarks

Pin metadata provides information about files that have been pinned to IPFS through the Pinata service. This includes the CID, custom metadata key-value pairs, and pinning information. Pinned files are guaranteed to remain available on the IPFS network as long as they remain pinned.