getCollectionSubscriptions
Method to get all subscriptions for:
- a specific collection
- a specific user
Usage
ts
const collectionActiveSubscriptions =
await dataProtectorSharing.getCollectionSubscriptions({
collectionId: 9,
});
Parameters
ts
import { type GetCollectionSubscriptionsParams } from '@iexec/dataprotector';
subscriberAddress Optional
Type: AddressOrENS
ts
const userActiveSubscriptions =
await dataProtectorSharing.getCollectionSubscriptions({
subscriberAddress: '0x246bdf...',
});
collectionId Optional
Type: number
ts
const collectionActiveSubscriptions =
await dataProtectorSharing.getCollectionSubscriptions({
collectionId: 9,
});
includePastSubscriptions Optional
Type: boolean
Default: false
ts
const userRentals = await dataProtectorSharing.getCollectionSubscriptions({
subscriberAddress: '0x246bdf...',
includePastSubscriptions: true,
});
Return value
ts
import { type GetCollectionSubscriptionsResponse } from '@iexec/dataprotector';
// Child types
import { type CollectionSubscription } from '@iexec/dataprotector';