GetPlainTextURL() public static method

Returns the full URL to the input wiki page using current site settings, specifying &action=raw
public static GetPlainTextURL ( string title ) : string
title string
return string
Example #1
0
        /// <summary>
        /// Gets the wiki text of the given article.
        /// </summary>
        /// <param name="ArticleTitle">The name of the article.</param>
        /// <returns>The wiki text of the article.</returns>
        public static string GetArticleText(string ArticleTitle)
        {
            if (!IsValidTitle(ArticleTitle))
            {
                return("");
            }

            string text = "";
            string url  = Variables.GetPlainTextURL(ArticleTitle);

            try
            {
                text = GetHTML(url, Encoding.UTF8);
            }
            catch
            {
                throw new Exception("There was a problem loading " + url + ", please make sure the page exists");
            }

            return(text);
        }