Class responsible for storing the list of feed providers this application is aware of, as well as the list of feeds that each provider can serve, and which of those we are subscribed to.

Constructors

Properties

activeSubscriptions: Subscription[]
errors: Map<string, SubscriptionError>
updatedEmitter: Emitter<void>

Methods

  • Parameters

    • providerUrl: string
    • providerName: string
    • Optional timestampAdded: number

    Returns SubscriptionProvider

  • Creates a new FeedSubscriptionManager with the data from this one.

    This includes all data (subscriptions, providers, and errors, but doesn't include dynamic state (listeners on the emitter).

    This is a shallow clone. The resulting object has new containers but the same underlying objects, which are expected to be immutable. If you need a deep clone, use serialization.

    Returns FeedSubscriptionManager

  • Performs the network fetch of a subscription, and inspects the results for validity. The error log for the subscription will be reset and repopulated, so callers should check this in order to determine success.

    Parameters

    Returns Promise<SubscriptionActions[]>

  • Parameters

    • providerUrl: string
    • feedId: string

    Returns undefined | Subscription

  • Parameters

    • subscriptionId: string
    • message: string

    Returns void

  • Returns Subscription[]

  • Parameters

    • subscriptionId: string

    Returns null | SubscriptionError

  • Returns Promise<string>

  • Parameters

    • providerUrl: string
    • providerName: string
    • Optional timestampAdded: number

    Returns SubscriptionProvider

  • Parameters

    • providerUrl: string

    Returns undefined | SubscriptionProvider

  • Parameters

    • subscriptionId: string

    Returns undefined | Subscription

  • Returns Map<string, Subscription[]>

  • Parameters

    • providerUrl: string
    • feedId: string

    Returns Subscription[]

  • Parameters

    • providerUrl: string

    Returns Subscription[]

  • Parameters

    • providerUrl: string

    Returns boolean

  • Fetches a list of all feeds from the given provider URL.

    Parameters

    • providerUrl: string

    Returns Promise<ListFeedsResponseValue>

  • Merges subscriptions from other into this, returning an object with a count of the number of new providers and subscriptions added.

    Only subscriptions and providers are included in the merge. Other non-persistent state (listeners, errors) is ignored.

    The merge only ever adds new providers and/or subscriptions which do not already exist. Existing entries are never mutated. Subscriptions will be added only if their subscription ID is globally unique, and their feed ID is unique within the scope of their provider URL. Providers are added only if there is a new subscription to add and no existing provider for its URL.

    Parameters

    Returns {
        newProviders: number;
        newSubscriptions: number;
    }

    • newProviders: number
    • newSubscriptions: number
  • Parameters

    Returns Promise<SubscriptionActions[]>

  • Poll a single subscription. Intended for use when resolving errors with a feed that failed to load due to network/connection issues.

    Parameters

    Returns Promise<SubscriptionActions[]>

  • This "refreshes" a feed. Existing feed errors are cleared, and new ones may be detected.

    Returns the successful responses. Failures will be recorded in this.errors for display to the user.

    Parameters

    • credentialManager: CredentialManagerAPI
    • Optional onFinish: ((actions) => Promise<void>)
    • Optional idsToPoll: (undefined | string)[]

    Returns Promise<SubscriptionActions[]>

  • Parameters

    • providerUrl: string

    Returns void

  • Parameters

    • subscriptionId: string

    Returns void

  • Returns string

  • Parameters

    Returns void

  • Parameters

    • providerUrl: string
    • info: Feed<PCDPackage<any, any, any, any>>
    • Optional replace: boolean

    Returns Promise<Subscription>

  • Parameters

    • subscriptionId: string

    Returns void

  • Parameters

    Returns void

  • Validates that the actions received in a feed are permitted by the user.

    Parameters

    Returns void

  • Create a FeedSubscriptionManager from serialized data. Upgrades from serialized data based on version number.

    Parameters

    Returns FeedSubscriptionManager

Generated using TypeDoc