/// <summary> /// Returns the top 30 question answerers active in a single tag, of either all-time or the last 30 days. /// </summary> /// <param name="tags">The list of tags to query</param> /// <param name="period">The time period to query</param> /// <returns></returns> public IEnumerable <TopUser> GetTopAnswerers(IEnumerable <string> tags, TopUserPeriod period) { var sortArgs = period.GetAttribute <SortArgsAttribute>(); var response = MakeRequest <TopUserResponse>("tags", new string[] { tags.Vectorize(), "top-answerers", sortArgs.Sort }, new { key = apiKey }); return(response.TopUsers); }
/// <summary> /// Returns the top 30 question askers active in a single tag, of either all-time or the last 30 days. /// </summary> /// <param name="tag">The name of the tag to query</param> /// <param name="period">The period of time to query</param> /// <returns></returns> public IEnumerable <TopUser> GetTopAskers(string tag, TopUserPeriod period) { return(GetTopAskers(new string[] { tag }, period)); }
/// <summary> /// Returns the top 30 question askers active in a single tag, of either all-time or the last 30 days. /// </summary> /// <param name="onSuccess"></param> /// <param name="onError"></param> /// <param name="tag">The name of the tag to query</param> /// <param name="period">The period of time to query</param> /// <returns></returns> public void GetTopAskers(Action <IEnumerable <TopUser> > onSuccess, Action <ApiException> onError, string tag, TopUserPeriod period) { GetTopAskers(onSuccess, onError, new string[] { tag }, period); }
/// <summary> /// Returns the top 30 question askers active in a single tag, of either all-time or the last 30 days. /// </summary> /// <param name="onSuccess"></param> /// <param name="onError"></param> /// <param name="tags">The list of tags to query</param> /// <param name="period">The time period to query</param> /// <returns></returns> public void GetTopAnswerers(Action <IEnumerable <TopUser> > onSuccess, Action <ApiException> onError, IEnumerable <string> tags, TopUserPeriod period) { var sortArgs = period.GetAttribute <SortArgsAttribute>(); MakeRequest <TopUserResponse>("tags", new string[] { tags.Vectorize(), "top-answerers", sortArgs.Sort }, new { key = apiKey }, (items) => onSuccess(items.TopUsers), onError); }