Esempio n. 1
0
        public OutputData Delete(IInputData input, string id)
        {
            WeMediaId    mediaId = new WeMediaId(id);
            WeixinResult res     = mediaId.Delete();

            return(OutputData.CreateToolkitObject(KeyData.Empty));
        }
Esempio n. 2
0
        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);
 }
Esempio n. 4
0
        public object Query(IInputData input, string id)
        {
            WeMediaId mediaId = new WeMediaId(id);

            return(mediaId.CreateNewsMaterial().Articles[0]);
        }
Esempio n. 5
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];
 }