Class SubscriptionAPI


  • public class SubscriptionAPI
    extends BaseAPI
    Subscriptions allows the user to be notified when an object is created, updated, delete, comments added to it or rated.
    • Constructor Detail

      • SubscriptionAPI

        public SubscriptionAPI​(ResourceFactory resourceFactory)
    • Method Detail

      • getSubscription

        public Subscription getSubscription​(int susbcriptionId)
        Returns the subscription with the given id
        Parameters:
        susbcriptionId - The id of the subscription
        Returns:
        The subscription
      • getSubscription

        public Subscription getSubscription​(Reference reference)
        Get the subscription for the given object
        Parameters:
        reference - The reference to object
        Returns:
        The subscription on the object
      • subscribe

        public void subscribe​(Reference reference)
        Subscribes the user to the given object. Based on the object type, the user will receive notifications when actions are performed on the object. See the area for more details.
        Parameters:
        reference - The reference to the object to subscribe to
      • unsubscribe

        public void unsubscribe​(int subscriptionId)
        Stops the subscription with the given id
        Parameters:
        subscriptionId - The id of the subscription
      • unsubscribe

        public void unsubscribe​(Reference reference)
        Unsubscribe from getting notifications on actions on the given object.
        Parameters:
        reference - The reference to the object