Esempio n. 1
0
 /// <summary>
 /// Get my suggestions of users to follow.
 /// </summary>
 /// This call uses the token from the Authorization header to determine the
 /// type of suggestions to provide.
 /// In particular, the token determines which third-party to
 /// contact to obtain a list of suggested users,
 /// such as friends (for Facebook), following users (for Twitter),
 /// and contacts (for Google and Microsoft).
 /// We check each retrieved user to see whether they are
 /// registered with Embedded Social (this is done by checking
 /// whether the user appears as a linked account in any Embedded
 /// Social profile).
 /// Note that passing a token without the appropiate scopes will
 /// prevent Embedded Social from obtaining a list
 /// of suggested users.
 /// Support for input parameters 'cursor' and 'limit' is not
 /// implemented in the current API release.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='cursor'>
 /// Current read cursor
 /// </param>
 /// <param name='limit'>
 /// Number of users compact views to return
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <UserCompactView> > GetSuggestionsUsersAsync(this IMyFollowing operations, string authorization, string cursor = default(string), int?limit = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetSuggestionsUsersWithHttpMessagesAsync(authorization, cursor, limit, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Get the feed of activities by users that I'm following or on topics that
 /// I'm following.
 /// </summary>
 /// My following activity feed is a list of activities that are either
 /// (1) performed by users that I am following, or
 /// (2) performed on topics that I am following.
 /// This feed is time ordered, with the most recent activity
 /// first.
 /// An activity is added to this feed when a user I am following
 /// does one of the following 4 actions:
 /// (a) create a comment; (b) create a reply; (c) like a topic;
 /// (d) follow a user.
 /// If a user that I am following is deleted, then their past
 /// activities will no longer appear in this feed.
 /// If an activity is performed on content that is then deleted,
 /// that activity will no longer appear in this feed.
 /// If a user has un-done an activity (e.g. unlike a previous
 /// like), then that activity will no longer appear in this feed.
 /// Similarly, an activity is added to this feed when a user does
 /// one of the following 3 actions on a topic that I am following:
 /// (a) create a comment; (b) create a reply; (c) like the topic.
 /// If a topic that I am following is deleted, then past
 /// activities on that topic will no longer appear in this feed.
 /// If an activity that is performed is then deleted, that
 /// activity will no longer appear in this feed.
 /// Ignore the unread status of each activity - it will always be
 /// true.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='cursor'>
 /// Current read cursor
 /// </param>
 /// <param name='limit'>
 /// Number of items to return
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <FeedResponseActivityView> GetActivitiesAsync(this IMyFollowing operations, string authorization, string cursor = default(string), int?limit = default(int?), CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetActivitiesWithHttpMessagesAsync(authorization, cursor, limit, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Remove a topic from my combined following topics feed.
 /// </summary>
 /// My combined following topics feed is a feed of topics I am explicitly
 /// following, combined with topics created by all users
 /// that I am following.  This call will remove the specified
 /// topic from that feed.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='topicHandle'>
 /// Handle of following topic
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> DeleteTopicFromCombinedFollowingFeedAsync(this IMyFollowing operations, string topicHandle, string authorization, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.DeleteTopicFromCombinedFollowingFeedWithHttpMessagesAsync(topicHandle, authorization, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 4
0
 /// <summary>
 /// Follow a topic
 /// </summary>
 /// When I follow a topic, that topic will appear on my following topics feed.
 /// When users
 /// perform actions on the topic (such as posting comments or
 /// replies), those actions will
 /// appear on my following activites feed.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='request'>
 /// Post following topic request
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <object> PostFollowingTopicAsync(this IMyFollowing operations, PostFollowingTopicRequest request, string authorization, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.PostFollowingTopicWithHttpMessagesAsync(request, authorization, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Get my suggestions of users to follow.
 /// </summary>
 /// This call uses the token from the Authorization header to determine the
 /// type of suggestions to provide.
 /// In particular, the token determines which third-party to
 /// contact to obtain a list of suggested users,
 /// such as friends (for Facebook), following users (for Twitter),
 /// and contacts (for Google and Microsoft).
 /// We check each retrieved user to see whether they are
 /// registered with Embedded Social (this is done by checking
 /// whether the user appears as a linked account in any Embedded
 /// Social profile).
 /// Note that passing a token without the appropiate scopes will
 /// prevent Embedded Social from obtaining a list
 /// of suggested users.
 /// Support for input parameters 'cursor' and 'limit' is not
 /// implemented in the current API release.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='cursor'>
 /// Current read cursor
 /// </param>
 /// <param name='limit'>
 /// Number of users compact views to return
 /// </param>
 public static IList <UserCompactView> GetSuggestionsUsers(this IMyFollowing operations, string authorization, string cursor = default(string), int?limit = default(int?))
 {
     return(Task.Factory.StartNew(s => ((IMyFollowing)s).GetSuggestionsUsersAsync(authorization, cursor, limit), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 6
0
 /// <summary>
 /// Get the feed of activities by users that I'm following or on topics that
 /// I'm following.
 /// </summary>
 /// My following activity feed is a list of activities that are either
 /// (1) performed by users that I am following, or
 /// (2) performed on topics that I am following.
 /// This feed is time ordered, with the most recent activity
 /// first.
 /// An activity is added to this feed when a user I am following
 /// does one of the following 4 actions:
 /// (a) create a comment; (b) create a reply; (c) like a topic;
 /// (d) follow a user.
 /// If a user that I am following is deleted, then their past
 /// activities will no longer appear in this feed.
 /// If an activity is performed on content that is then deleted,
 /// that activity will no longer appear in this feed.
 /// If a user has un-done an activity (e.g. unlike a previous
 /// like), then that activity will no longer appear in this feed.
 /// Similarly, an activity is added to this feed when a user does
 /// one of the following 3 actions on a topic that I am following:
 /// (a) create a comment; (b) create a reply; (c) like the topic.
 /// If a topic that I am following is deleted, then past
 /// activities on that topic will no longer appear in this feed.
 /// If an activity that is performed is then deleted, that
 /// activity will no longer appear in this feed.
 /// Ignore the unread status of each activity - it will always be
 /// true.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 /// <param name='cursor'>
 /// Current read cursor
 /// </param>
 /// <param name='limit'>
 /// Number of items to return
 /// </param>
 public static FeedResponseActivityView GetActivities(this IMyFollowing operations, string authorization, string cursor = default(string), int?limit = default(int?))
 {
     return(Task.Factory.StartNew(s => ((IMyFollowing)s).GetActivitiesAsync(authorization, cursor, limit), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 7
0
 /// <summary>
 /// Remove a topic from my combined following topics feed.
 /// </summary>
 /// My combined following topics feed is a feed of topics I am explicitly
 /// following, combined with topics created by all users
 /// that I am following.  This call will remove the specified
 /// topic from that feed.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='topicHandle'>
 /// Handle of following topic
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 public static object DeleteTopicFromCombinedFollowingFeed(this IMyFollowing operations, string topicHandle, string authorization)
 {
     return(Task.Factory.StartNew(s => ((IMyFollowing)s).DeleteTopicFromCombinedFollowingFeedAsync(topicHandle, authorization), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 8
0
 /// <summary>
 /// Follow a topic
 /// </summary>
 /// When I follow a topic, that topic will appear on my following topics feed.
 /// When users
 /// perform actions on the topic (such as posting comments or
 /// replies), those actions will
 /// appear on my following activites feed.
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='request'>
 /// Post following topic request
 /// </param>
 /// <param name='authorization'>
 /// Format is: "Scheme CredentialsList". Possible values are:
 ///
 /// - Anon AK=AppKey
 ///
 /// - SocialPlus TK=SessionToken
 ///
 /// - Facebook AK=AppKey|TK=AccessToken
 ///
 /// - Google AK=AppKey|TK=AccessToken
 ///
 /// - Twitter AK=AppKey|RT=RequestToken|TK=AccessToken
 ///
 /// - Microsoft AK=AppKey|TK=AccessToken
 ///
 /// - AADS2S AK=AppKey|[UH=UserHandle]|TK=AADToken
 /// </param>
 public static object PostFollowingTopic(this IMyFollowing operations, PostFollowingTopicRequest request, string authorization)
 {
     return(Task.Factory.StartNew(s => ((IMyFollowing)s).PostFollowingTopicAsync(request, authorization), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }