public OutputData Delete(IInputData input, string id) { WeMediaId mediaId = new WeMediaId(id); WeixinResult res = mediaId.Delete(); return(OutputData.CreateToolkitObject(KeyData.Empty)); }
public WeixinResult Update(WeMediaId mediaId, int index) { TkDebug.AssertArgumentNull(mediaId, "mediaId", null); string url = WeUtil.GetUrl(WeMaterialConst.UPDATE_NEWS); WeNewsUpdate request = new WeNewsUpdate(mediaId, index, this.Articles[0]); string res = request.WriteJson(); var result = WeUtil.PostDataToUri(url, res, new WeixinResult()); return result; }
public OutputData Delete(IInputData input, string id) { WeMediaId mediaId = new WeMediaId(id); mediaId.Delete(); return OutputData.CreateToolkitObject(KeyData.Empty); }
public object Query(IInputData input, string id) { WeMediaId mediaId = new WeMediaId(id); return(mediaId.CreateNewsMaterial().Articles[0]); }
internal WeNewsUpdate(WeMediaId mediaId, int index, MpNewsArticle articles) { MediaId = mediaId.MediaId; Index = index; Articles = articles; }
public object Query(IInputData input, string id) { WeMediaId mediaId = new WeMediaId(id); return mediaId.CreateNewsMaterial().Articles[0]; }