Class 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 Detail

    • 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 10
        offset - How far should the objects be offset, defaults to 0
        dateFrom - The date and time that all events should be after, defaults to no limit
        dateTo - 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 10
        offset - How far should the objects be offset, defaults to 0
        dateFrom - The date and time that all events should be after, defaults to no limit
        dateTo - 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 10
        offset - How far should the objects be offset, defaults to 0
        dateFrom - The date and time that all events should be after, defaults to no limit
        dateTo - 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 10
        offset - How far should the objects be offset, defaults to 0
        dateFrom - The date and time that all events should be after, defaults to no limit
        dateTo - 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 10
        offset - How far should the objects be offset, defaults to 0
        dateFrom - The date and time that all events should be after, defaults to no limit
        dateTo - 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 10
        offset - How far should the objects be offset, defaults to 0
        dateFrom - The date and time that all events should be after, defaults to no limit
        dateTo - 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 10
        offset - How far should the objects be offset, defaults to 0
        dateFrom - The date and time that all events should be after, defaults to no limit
        dateTo - The date and time that all events should be before, defaults to no limit
        Returns:
        The list of stream objects