Package com.podio.subscription
Class SubscriptionAPI
- java.lang.Object
-
- com.podio.BaseAPI
-
- com.podio.subscription.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 Summary
Constructors Constructor Description SubscriptionAPI(ResourceFactory resourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptiongetSubscription(int susbcriptionId)Returns the subscription with the given idSubscriptiongetSubscription(Reference reference)Get the subscription for the given objectvoidsubscribe(Reference reference)Subscribes the user to the given object.voidunsubscribe(int subscriptionId)Stops the subscription with the given idvoidunsubscribe(Reference reference)Unsubscribe from getting notifications on actions on the given object.-
Methods inherited from class com.podio.BaseAPI
getResourceFactory
-
-
-
-
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
-
-