WikiCrawler/MediaWiki/Api.cs
/// <summary>
/// Purges the cache for the specified pages.
/// </summary>
Purges the cache for the specified pages.
Purges the cache for the specified pages .
public bool PurgePages(IList<string> inpages)
		{
			if (inpages.Count == 0) return true;
			string baseQuery = "format=json"
				+ "&action=purge"
				+ "&titles=" + UrlEncode(string.Join("|", inpages))
				+ "&forcelinkupdate";
			HttpWebRequest request = CreateApiRequest();
			string json;
			using (StreamReader read = new StreamReader(EasyWeb.Post(request, baseQuery)))
			{
				json = read.ReadToEnd();
			}
			Dictionary<string, object> deser = (Dictionary<string, object>)new JavaScriptSerializer().DeserializeObject(json);
			return true;
		}
public bool PurgePages ( IList < string > inpages ) { if ( inpages . Count == 0 ) return true ; string baseQuery = " " + " " + " " + UrlEncode ( string . Join ( " " , inpages ) ) + " " ; HttpWebRequest request = CreateApiRequest ( ) ; string json ; using ( StreamReader read = new StreamReader ( EasyWeb . Post ( request , baseQuery ) ) ) { json = read . ReadToEnd ( ) ; } Dictionary < string , object > deser = ( Dictionary < string , object > ) new JavaScriptSerializer ( ) . DeserializeObject ( json ) ; return true ; }
Purges the cache for the specified pages.
Purges the cache for the specified pages .
//Download stream //Parse and read
inpages
IList<string>