Class FeedService

A service supporting the retrieval and filtering of feed items generated by Episerver's Social Activity Streams system.

Inheritance
System.Object
FeedService
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Social.ActivityStreams
Assembly: EPiServer.Social.ActivityStreams.dll
Version: 1.5.4
Syntax
public class FeedService : IFeedService

Constructors

FeedService(IFeedItemRepository)

Constructs and returns a FeedService instance.

Declaration
public FeedService(IFeedItemRepository feedRepository)
Parameters
Type Name Description
IFeedItemRepository feedRepository

An implementation of the IFeedDataRepository that can communicate with the underlying data store.

Methods

Get(Criteria<FeedItemFilter>)

Retrieves a page of feed items from the underlying data store, as described by the specified criteria.

Declaration
public ResultPage<FeedItem> Get(Criteria<FeedItemFilter> criteria)
Parameters
Type Name Description
Criteria<FeedItemFilter> criteria

Criteria by which to filter feed items

Returns
Type Description
ResultPage<FeedItem>

Page of feed items

Exceptions
Type Condition
System.ArgumentNullException

Thrown when null passed for criteria.

InvalidPageInfoException

Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000.

SocialException

Thrown when an error occurs while processing the request.

SocialAuthenticationException

Thrown when an authentication error occurs while processing the request.

MaximumDataSizeExceededException

Thrown when a Social object is submitted, which exceeds the size restrictions of the system.

SocialCommunicationException

Thrown when errors occur communicating with the cloud services.

Get<TExtension>(CompositeCriteria<FeedItemFilter, TExtension>)

Retrieves a page of feed items from the underlying data store, as described by the specified criteria. Feed items are filtered by the type of payload data associated with each corresponding activity.

Declaration
public ResultPage<Composite<FeedItem, TExtension>> Get<TExtension>(CompositeCriteria<FeedItemFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<FeedItemFilter, TExtension> criteria

Criteria by which to filter feed items

Returns
Type Description
ResultPage<Composite<FeedItem, TExtension>>

Page of composite item ratings

Type Parameters
Name Description
TExtension

Type of payload data associated with the desired item ratings

Exceptions
Type Condition
System.ArgumentNullException

Thrown when null passed for criteria.

InvalidPageInfoException

Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000.

SocialException

Thrown when an error occurs while processing the request.

SocialAuthenticationException

Thrown when an authentication error occurs while processing the request.

MaximumDataSizeExceededException

Thrown when a Social object is submitted, which exceeds the size restrictions of the system.

SocialCommunicationException

Thrown when errors occur communicating with the cloud services.

GetAsync(Criteria<FeedItemFilter>)

Asynchronously retrieves a page of feed items from the underlying data store, as described by the specified criteria.

Declaration
public Task<ResultPage<FeedItem>> GetAsync(Criteria<FeedItemFilter> criteria)
Parameters
Type Name Description
Criteria<FeedItemFilter> criteria

Criteria by which to filter feed items

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<FeedItem>>

Page of feed items

Exceptions
Type Condition
System.ArgumentNullException

Thrown when null passed for criteria.

InvalidPageInfoException

Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000.

SocialException

Thrown when an error occurs while processing the request.

SocialAuthenticationException

Thrown when an authentication error occurs while processing the request.

MaximumDataSizeExceededException

Thrown when a Social object is submitted, which exceeds the size restrictions of the system.

SocialCommunicationException

Thrown when errors occur communicating with the cloud services.

GetAsync<TExtension>(CompositeCriteria<FeedItemFilter, TExtension>)

Asynchronously retrieves a page of feed items from the underlying data store, as described by the specified criteria. Feed items are filtered by the type of payload data associated with each corresponding activity.

Declaration
public Task<ResultPage<Composite<FeedItem, TExtension>>> GetAsync<TExtension>(CompositeCriteria<FeedItemFilter, TExtension> criteria)
    where TExtension : class
Parameters
Type Name Description
CompositeCriteria<FeedItemFilter, TExtension> criteria

Criteria by which to filter feed items

Returns
Type Description
System.Threading.Tasks.Task<ResultPage<Composite<FeedItem, TExtension>>>

Page of composite item ratings

Type Parameters
Name Description
TExtension

Type of payload data associated with the desired item ratings

Exceptions
Type Condition
System.ArgumentNullException

Thrown when null passed for criteria.

InvalidPageInfoException

Thrown when the page info is invalid such as using a negative value for PageOffset or PageSize or using a PageSize that exceeds 1000.

SocialException

Thrown when an error occurs while processing the request.

SocialAuthenticationException

Thrown when an authentication error occurs while processing the request.

MaximumDataSizeExceededException

Thrown when a Social object is submitted, which exceeds the size restrictions of the system.

SocialCommunicationException

Thrown when errors occur communicating with the cloud services.

Implements

arrow_upward