/// <summary> /// Get user topics sorted by creation time /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userHandle'> /// Handle of queried user /// </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 <FeedResponseTopicView> GetTopicsAsync(this IUserTopics operations, string userHandle, string authorization, string cursor = default(string), int?limit = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetTopicsWithHttpMessagesAsync(userHandle, authorization, cursor, limit, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get user topics sorted by creation time /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='userHandle'> /// Handle of queried user /// </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 FeedResponseTopicView GetTopics(this IUserTopics operations, string userHandle, string authorization, string cursor = default(string), int?limit = default(int?)) { return(Task.Factory.StartNew(s => ((IUserTopics)s).GetTopicsAsync(userHandle, authorization, cursor, limit), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { this.Blobs = new Blobs(this); this.Builds = new Builds(this); this.Comments = new Comments(this); this.TopicComments = new TopicComments(this); this.Hashtags = new Hashtags(this); this.Images = new Images(this); this.TopicLikes = new TopicLikes(this); this.ReplyLikes = new ReplyLikes(this); this.CommentLikes = new CommentLikes(this); this.MyNotifications = new MyNotifications(this); this.MyPins = new MyPins(this); this.MyPushRegistrations = new MyPushRegistrations(this); this.Replies = new Replies(this); this.CommentReplies = new CommentReplies(this); this.UserReports = new UserReports(this); this.TopicReports = new TopicReports(this); this.ReplyReports = new ReplyReports(this); this.CommentReports = new CommentReports(this); this.Search = new Search(this); this.Sessions = new Sessions(this); this.RequestTokens = new RequestTokens(this); this.UserFollowers = new UserFollowers(this); this.MyPendingUsers = new MyPendingUsers(this); this.MyFollowers = new MyFollowers(this); this.MyFollowing = new MyFollowing(this); this.MyBlockedUsers = new MyBlockedUsers(this); this.UserFollowing = new UserFollowing(this); this.Topics = new Topics(this); this.MyTopics = new MyTopics(this); this.MyAppFollowing = new MyAppFollowing(this); this.MyApps = new MyApps(this); this.MyLikes = new MyLikes(this); this.MyLinkedAccounts = new MyLinkedAccounts(this); this.Users = new Users(this); this.UserTopics = new UserTopics(this); this.BaseUri = new Uri("https://api.embeddedsocial.microsoft.com"); SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }