Package com.podio.stream
Class StreamAPI
- java.lang.Object
-
- com.podio.BaseAPI
-
- com.podio.stream.StreamAPI
-
public class StreamAPI 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 StreamAPI(ResourceFactory resourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<StreamObjectV2>getAppStream(int appId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)Returns the stream for the app.List<StreamObject>getGlobalStream(Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)Returns the global stream.List<StreamObjectV2>getGlobalStreamV2(Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)Returns the global stream.List<StreamObject>getOrganizationStream(int orgId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)Returns the stream for the organization.List<StreamObjectV2>getOrganizationStreamV2(int orgId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)Returns the stream for the organization.List<StreamObject>getSpaceStream(int spaceId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)Returns the stream for the space.List<StreamObjectV2>getSpaceStreamV2(int spaceId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)Returns the stream for the space.StreamObjectgetStreamObject(Reference reference)Returns an object (item or status) as a stream object.StreamObjectV2getStreamObjectV2(Reference reference)Returns an object (item or status) as a stream object.-
Methods inherited from class com.podio.BaseAPI
getResourceFactory
-
-
-
-
Constructor Detail
-
StreamAPI
public StreamAPI(ResourceFactory resourceFactory)
-
-
Method Detail
-
getStreamObject
public StreamObject getStreamObject(Reference reference)
Returns an object (item or status) as a stream object. This is useful when a new status has been posted and should be rendered directly in the stream without reloading the entire stream.- Parameters:
reference- The reference to the item- Returns:
- The stream object
-
getStreamObjectV2
public StreamObjectV2 getStreamObjectV2(Reference reference)
Returns an object (item or status) as a stream object. This is useful when a new status has been posted and should be rendered directly in the stream without reloading the entire stream.- Parameters:
reference- The reference to the item- Returns:
- The stream object
-
getGlobalStream
public List<StreamObject> getGlobalStream(Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
Returns the global stream. This includes items and statuses with comments, ratings, files and edits.- Parameters:
limit- How many objects should be returned, defaults to 10offset- How far should the objects be offset, defaults to 0dateFrom- The date and time that all events should be after, defaults to no limitdateTo- The date and time that all events should be before, defaults to no limit- Returns:
- The list of stream objects
-
getGlobalStreamV2
public List<StreamObjectV2> getGlobalStreamV2(Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
Returns the global stream. The types of objects in the stream can be either "item", "status" or "task".- Parameters:
limit- How many objects should be returned, defaults to 10offset- How far should the objects be offset, defaults to 0dateFrom- The date and time that all events should be after, defaults to no limitdateTo- The date and time that all events should be before, defaults to no limit- Returns:
- The list of stream objects
-
getOrganizationStream
public List<StreamObject> getOrganizationStream(int orgId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
Returns the stream for the organization. Is identical to the global stream, but only returns objects in the organization.- Parameters:
limit- How many objects should be returned, defaults to 10offset- How far should the objects be offset, defaults to 0dateFrom- The date and time that all events should be after, defaults to no limitdateTo- The date and time that all events should be before, defaults to no limit- Returns:
- The list of stream objects
-
getOrganizationStreamV2
public List<StreamObjectV2> getOrganizationStreamV2(int orgId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
Returns the stream for the organization. Is identical to the global stream, but only returns objects in the organization.- Parameters:
limit- How many objects should be returned, defaults to 10offset- How far should the objects be offset, defaults to 0dateFrom- The date and time that all events should be after, defaults to no limitdateTo- The date and time that all events should be before, defaults to no limit- Returns:
- The list of stream objects
-
getSpaceStream
public List<StreamObject> getSpaceStream(int spaceId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
Returns the stream for the space. Is identical to the global stream, but only returns objects in the space.- Parameters:
limit- How many objects should be returned, defaults to 10offset- How far should the objects be offset, defaults to 0dateFrom- The date and time that all events should be after, defaults to no limitdateTo- The date and time that all events should be before, defaults to no limit- Returns:
- The list of stream objects
-
getSpaceStreamV2
public List<StreamObjectV2> getSpaceStreamV2(int spaceId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
Returns the stream for the space. Is identical to the global stream, but only returns objects in the space.- Parameters:
limit- How many objects should be returned, defaults to 10offset- How far should the objects be offset, defaults to 0dateFrom- The date and time that all events should be after, defaults to no limitdateTo- The date and time that all events should be before, defaults to no limit- Returns:
- The list of stream objects
-
getAppStream
public List<StreamObjectV2> getAppStream(int appId, Integer limit, Integer offset, org.joda.time.DateTime dateFrom, org.joda.time.DateTime dateTo)
Returns the stream for the app. Is identical to the global stream, but only returns objects in the app.- Parameters:
limit- How many objects should be returned, defaults to 10offset- How far should the objects be offset, defaults to 0dateFrom- The date and time that all events should be after, defaults to no limitdateTo- The date and time that all events should be before, defaults to no limit- Returns:
- The list of stream objects
-
-