public override WeMediaId Add() { string url = WeUtil.GetUrl(WeMaterialConst.ADD_NEWS); var result = WeUtil.PostDataToUri(url, this.WriteJson(), new WeMediaId()); return(result); }
public static AutoReplyRule GetCurrentRule() { string url = WeUtil.GetUrl("https://api.weixin.qq.com/cgi-bin/get_current_autoreply_info?access_token={0}"); var result = NetUtil.HttpGetReadJson(new Uri(url), new AutoReplyRule()); return(result); }
public static WeSelfMenu GetMenuInfo() { string url = WeUtil.GetUrl(WeConst.SELF_MENU); WeSelfMenu result = NetUtil.HttpGetReadJson(new Uri(url), new WeSelfMenu()); return(result); }
public WeixinResult UpdateProducts(IEnumerable <string> insertProducts, IEnumerable <string> deleteProducts) { WeGroupProductActionList request = new WeGroupProductActionList { GroupId = GroupId }; if (insertProducts != null) { var added = from item in insertProducts select new WeGroupProductAction(item, GroupAction.Add); request.Product.AddRange(added); } if (deleteProducts != null) { var deleted = from item in deleteProducts select new WeGroupProductAction(item, GroupAction.Remove); request.Product.AddRange(deleted); } string url = WeUtil.GetUrl(WeShopConst.UPDATE_GROUP_PRODUCT_URL); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); FetchDetail(); return(result); }
public static IList <WeMerchantGroup> QueryAllGroups() { string url = WeUtil.GetUrl(WeShopConst.ALL_GROUP_URL); var result = WeUtil.GetFromUri(url, new WeMerchantGroupList()); return(result.GroupsDetail); }
public static List <WeCardColor> ColorsGet() { string url = WeUtil.GetUrl(WeCardConst.GET_COLORS); var result = WeUtil.GetFromUri(url, new WeColors()); return(result.Colors); }
private T Create <T>(T result) where T : WeBaseMaterial { string url = WeUtil.GetUrl(WeMaterialConst.GET_MATERIAL); result = WeUtil.PostDataToUri(url, WeMaterialConst.NAME_MODEL, this.WriteJson(), result); return(result); }
public override WeMediaId Add() { string url = WeUtil.GetUrl(WeMaterialConst.ADD_MATERIAL); var result = WeUtil.UploadFile(url, fFileName, fData, new WeMediaId()); return(result); }
public WeixinResult Update() { string url = WeUtil.GetUrl(WeShopConst.UPDATE_SHELF_URL); var reuslt = WeUtil.PostToUri(url, this.WriteJson(), new WeixinResult()); return(reuslt); }
public long Send() { string url = WeUtil.GetUrl(WeConst.GROUP_MASS_MESSAGE_URL); var msg = WeUtil.PostToUri(url, this.WriteJson(), new MassMessageResult()); return(msg.ResultId); }
public WeixinResult Add() { string url = WeUtil.GetUrl(WeCardConst.ADD_POI); WePoi poi = new WePoi(this); return(WeUtil.PostDataToUri(url, poi.WriteJson(), new WeixinResult())); }
public static IEnumerable <WeDeliveryTemplate> QueryAllTemplates() { string url = WeUtil.GetUrl(WeShopConst.ALL_TEMPLATE_URL); var result = WeUtil.GetFromUri(url, new WeTemplateInfoList()); return(result.TemplatesInfos); }
public static WeixinResult Delete(long msgId) { MassMessageResult msg = new MassMessageResult(msgId); string url = WeUtil.GetUrl(WeConst.DELETE_MASS_MESSAGE_URL); return(WeUtil.PostToUri(url, msg.WriteJson(), new WeixinResult())); }
public static IEnumerable <ServiceAccount> GetAccountList() { string url = WeUtil.GetUrl(WeConst.GET_KF_LIST); ServiceAccountList result = NetUtil.HttpGetReadJson(new Uri(url), new ServiceAccountList()); return(result.KfList); }
internal static WeMaterialCount Count() { string url = WeUtil.GetUrl(WeMaterialConst.GET_MATERIAL_COUNT); var result = WeUtil.GetFromUri <WeMaterialCount>(url); return(result); }
public MediaId UploadMessage() { string url = WeUtil.GetUrl(WeConst.NEWS_MASS_URL); var mediaId = WeUtil.PostToUri(url, this.WriteJson(), new MediaId()); return(mediaId); }
public WeixinResult Update() { string url = WeUtil.GetUrl(WeConst.UPDATE_KF_ACCOUNT); WeixinResult result = WeUtil.PostDataToUri(url, this.WriteJson(), new WeixinResult()); return(result); }
public WeixinResult Update() { string url = WeUtil.GetUrl(WeConst.REMARK_URL); return(WeUtil.PostToUri(url, this.WriteJson(WeConst.WRITE_SETTINGS), new WeixinResult())); }
internal static WeGroupCollection GetWeGroupList() { string url = WeUtil.GetUrl(WeConst.QUERY_GROUP); WeGroupCollection collection = WeUtil.GetFromUri <WeGroupCollection>(url); return(collection); }
public WeixinResult Delete() { string url = WeUtil.GetUrl(WeMaterialConst.DEL_MATERIAL); var result = WeUtil.PostDataToUri(url, this.WriteJson(), new WeixinResult()); return(result); }
public WeixinResult Reduce() { string url = WeUtil.GetUrl(WeShopConst.REDUCE_STOCK_URL); var result = WeUtil.PostToUri(url, this.WriteJson(), new WeixinResult()); return(result); }
public static WeixinResult Delete(long templateId) { string url = WeUtil.GetUrl(WeShopConst.DELETE_TEMPLATE_URL); WeTemplateId request = new WeTemplateId(templateId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); return(result); }
internal static WeMaterialPageData GetPageData(MediaType type, int offset, int count) { string url = WeUtil.GetUrl(WeMaterialConst.BATCH_GET_MATERIAL); WeMaterialQueryCondition request = new WeMaterialQueryCondition(type, offset, count); var result = WeUtil.PostDataToUri(url, request.WriteJson(), new WeMaterialPageData()); return(result); }
public static WeShelf Query(int shelfId) { string url = WeUtil.GetUrl(WeShopConst.SHELF_ID_URL); WeShelfId request = new WeShelfId(shelfId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeShelfInfo()); return((WeShelf)result); }
public WeShelf Insert() { string url = WeUtil.GetUrl(WeShopConst.ADD_SHELF_URL); var result = WeUtil.PostToUri(url, this.WriteJson(), new WeShelfId()); ShelfId = result.ShelfId; return(this); }
public static WeDeliveryTemplate Query(long templateId) { WeTemplateId request = new WeTemplateId(templateId); string url = WeUtil.GetUrl(WeShopConst.TEMPLATE_ID_URL); var response = WeUtil.PostToUri(url, request.WriteJson(), new WeTemplateInfo()); return(response.TemplateInfo); }
public static WeCardBatch CardBatchGet(int offset, int count) { string url = WeUtil.GetUrl(WeCardConst.CARD_BATCH_GET); WeLocationBatchGet request = new WeLocationBatchGet(offset, count); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeCardBatch()); return(result); }
public static WeixinResult Delete(int shelfId) { string url = WeUtil.GetUrl(WeShopConst.DELETE_SHELF_URL); WeShelfId request = new WeShelfId(shelfId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); return(result); }
public WeixinResult Update() { string url = WeUtil.GetUrl(WeConst.UPDATE_GROUP); WeGroupData data = new WeGroupData(this); WeixinResult result = new WeixinResult(); return(WeUtil.PostToUri(url, data.WriteJson(WeConst.WRITE_SETTINGS), result)); }
private byte[] CreateOtherMaterial() { string url = WeUtil.GetUrl(WeMaterialConst.GET_MATERIAL); WebResponse reWeb = NetUtil.HttpPost(new Uri(url), this.WriteJson()); byte[] buffer = NetUtil.GetResponseData(reWeb); return(buffer); }