/// <summary> /// Lists the currently trending pastes /// </summary> /// <returns>Enumerable of the trending pastes</returns> public static IEnumerable <Paste> ListTrendingPastes() { var result = Utills.PostRequest(Utills.URL_API, "api_dev_key=" + DevKey, "api_option=" + "trends"); if (result.Contains(Utills.ERROR)) { throw new PastebinException(result); } return(Utills.PastesFromXML(result)); }
/// <summary> /// Lists all pastes created by user /// </summary> /// <param name="resultsLimit">limits the paste count</param> /// <returns>Enumerable of pastes of this user</returns> public IEnumerable <Paste> ListPastes(int resultsLimit = 50) { var result = Utills.PostRequest(Utills.URL_API, "api_dev_key=" + Pastebin.DevKey, "api_user_key=" + userKey, "api_results_limit=" + resultsLimit, "api_option=" + "list"); if (result.Contains(Utills.ERROR)) { throw new PastebinException(result); } return(Utills.PastesFromXML(result)); }