Interface IFollowing
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
An entry point to the social following APIs
public interface IFollowing : IDataModel<IFollowing>, IDataModelParent, IDataModelWithContext, ISupportModules<IFollowing>
- Inherited Members
- Extension Methods
Methods
AmIFollowedBy(string)
Checks whether the specified user is following the current user.
bool AmIFollowedBy(string accountName)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
- bool
True if the specified user follows the current user
AmIFollowedByAsync(string)
Checks whether the specified user is following the current user.
Task<bool> AmIFollowedByAsync(string accountName)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
AmIFollowing(string)
Checks whether the current user is following the specified user.
bool AmIFollowing(string accountName)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
- bool
True if the current user follows the specified user
AmIFollowingAsync(string)
Checks whether the current user is following the specified user.
Task<bool> AmIFollowingAsync(string accountName)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
Follow(FollowData)
Makes the current user start following a user, document, site, or tag.
SocialFollowResult Follow(FollowData data)
Parameters
dataFollowDataDepending on what entity your're going to follow, can be an instance of FollowTagData, FollowDocumentData, FollowPersonData or FollowSiteData
Returns
- SocialFollowResult
A result, the follow status or an error
FollowAsync(FollowData)
Makes the current user start following a user, document, site, or tag.
Task<SocialFollowResult> FollowAsync(FollowData data)
Parameters
dataFollowDataDepending on what entity your're going to follow, can be an instance of FollowTagData, FollowDocumentData, FollowPersonData or FollowSiteData
Returns
- Task<SocialFollowResult>
A result, the follow status or an error
FollowedByMe(SocialActorTypes)
Gets users, documents, sites, and tags that the current user is following.
IList<ISocialActor> FollowedByMe(SocialActorTypes types)
Parameters
typesSocialActorTypesThe actor type to include. You can include many actory using bitwise operatoins. I.e. to include document and site types use SocialActorTypes.Documents | SocialActorTypes.Sites
Returns
- IList<ISocialActor>
A collection of ISocialActor
FollowedByMeAsync(SocialActorTypes)
Gets users, documents, sites, and tags that the current user is following.
Task<IList<ISocialActor>> FollowedByMeAsync(SocialActorTypes types)
Parameters
typesSocialActorTypesThe actor type to include. You can include many actory using bitwise operatoins. I.e. to include document and site types use SocialActorTypes.Documents | SocialActorTypes.Sites
Returns
- Task<IList<ISocialActor>>
A collection of ISocialActor
FollowedByMeCount(SocialActorTypes)
Gets the count of users, documents, sites, and tags that the current user is following.
int FollowedByMeCount(SocialActorTypes types)
Parameters
typesSocialActorTypesThe actor type to include. You can include many actory using bitwise operatoins. I.e. to include document and site types use SocialActorTypes.Documents | SocialActorTypes.Sites
Returns
- int
The number of followed items
FollowedByMeCountAsync(SocialActorTypes)
Gets the count of users, documents, sites, and tags that the current user is following.
Task<int> FollowedByMeCountAsync(SocialActorTypes types)
Parameters
typesSocialActorTypesThe actor type to include. You can include many actory using bitwise operatoins. I.e. to include document and site types use SocialActorTypes.Documents | SocialActorTypes.Sites
Returns
GetFollowersFor(string, params Expression<Func<IPersonProperties, object>>[])
Gets the people who are following the specified user.
IList<IPersonProperties> GetFollowersFor(string accountName, params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- IList<IPersonProperties>
An instance of IPersonProperties
GetFollowersForAsync(string, params Expression<Func<IPersonProperties, object>>[])
Gets the people who are following the specified user.
Task<IList<IPersonProperties>> GetFollowersForAsync(string accountName, params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- Task<IList<IPersonProperties>>
An instance of IPersonProperties
GetFollowingInfo()
Gets following information for the current user
IFollowingInfo GetFollowingInfo()
Returns
- IFollowingInfo
An instance of IFollowingInfo
GetFollowingInfoAsync()
Gets following information for the current user
Task<IFollowingInfo> GetFollowingInfoAsync()
Returns
- Task<IFollowingInfo>
An instance of IFollowingInfo
GetPeopleFollowedBy(string, params Expression<Func<IPersonProperties, object>>[])
Gets the people who the specified user is following.
IList<IPersonProperties> GetPeopleFollowedBy(string accountName, params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- IList<IPersonProperties>
An instance of IPersonProperties
GetPeopleFollowedByAsync(string, params Expression<Func<IPersonProperties, object>>[])
Gets the people who the specified user is following.
Task<IList<IPersonProperties>> GetPeopleFollowedByAsync(string accountName, params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
accountNamestringThe account name of the user, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- Task<IList<IPersonProperties>>
An instance of IPersonProperties
IsFollowed(FollowData)
Indicates whether the current user is following a specified user, document, site, or tag.
bool IsFollowed(FollowData data)
Parameters
dataFollowDataDepending on what entity your're going to stop following, can be an instance of FollowTagData, FollowDocumentData, FollowPersonData or FollowSiteData
Returns
- bool
True if the current user is following a specified user, document, site, or tag.
IsFollowedAsync(FollowData)
Indicates whether the current user is following a specified user, document, site, or tag.
Task<bool> IsFollowedAsync(FollowData data)
Parameters
dataFollowDataDepending on what entity your're going to stop following, can be an instance of FollowTagData, FollowDocumentData, FollowPersonData or FollowSiteData
Returns
MyFollowers()
Gets the users who are following the current user.
IList<ISocialActor> MyFollowers()
Returns
- IList<ISocialActor>
A collection of ISocialActor
MyFollowersAsync()
Gets the users who are following the current user.
Task<IList<ISocialActor>> MyFollowersAsync()
Returns
- Task<IList<ISocialActor>>
A collection of ISocialActor
MySuggestions()
Gets users who the current user might want to follow.
IList<ISocialActor> MySuggestions()
Returns
- IList<ISocialActor>
A collection of ISocialActor
MySuggestionsAsync()
Gets users who the current user might want to follow.
Task<IList<ISocialActor>> MySuggestionsAsync()
Returns
- Task<IList<ISocialActor>>
A collection of ISocialActor
StopFollowing(FollowData)
Makes the current user stop following a user, document, site, or tag.
void StopFollowing(FollowData data)
Parameters
dataFollowDataDepending on what entity your're going to stop following, can be an instance of FollowTagData, FollowDocumentData, FollowPersonData or FollowSiteData
StopFollowingAsync(FollowData)
Makes the current user stop following a user, document, site, or tag.
Task StopFollowingAsync(FollowData data)
Parameters
dataFollowDataDepending on what entity your're going to stop following, can be an instance of FollowTagData, FollowDocumentData, FollowPersonData or FollowSiteData