コード例 #1
0
ファイル: WeShelf.cs プロジェクト: hkmujj/zllinmitu
        public WeixinResult Update()
        {
            string url    = WeUtil.GetUrl(WeShopConst.UPDATE_SHELF_URL);
            var    reuslt = WeUtil.PostToUri(url, this.WriteJson(), new WeixinResult());

            return(reuslt);
        }
コード例 #2
0
        public WeThirdPartyGetAgentResponse get_agent()
        {
            string url    = WeCorpUtil.GetCorpUrl(WeThirdPartyConst.GET_AGENT, WeixinSettings.Current.CorpUserManagerSecret);
            var    result = WeUtil.PostToUri(url, this.WriteJson(), new WeThirdPartyGetAgentResponse());

            return(result);
        }
コード例 #3
0
ファイル: CorpDepartment.cs プロジェクト: hkmujj/zllinmitu
        public WeixinResult Update()
        {
            string url = WeCorpUtil.GetCorpUrl(WeCorpConst.UPDATE_DEPARTMENT,
                                               WeixinSettings.Current.CorpUserManagerSecret);

            return(WeUtil.PostToUri(url, this.WriteJson(WeConst.WRITE_SETTINGS), new WeixinResult()));
        }
コード例 #4
0
ファイル: GroupMassMessage.cs プロジェクト: hkmujj/zllinmitu
        public long Send()
        {
            string url = WeUtil.GetUrl(WeConst.GROUP_MASS_MESSAGE_URL);
            var    msg = WeUtil.PostToUri(url, this.WriteJson(), new MassMessageResult());

            return(msg.ResultId);
        }
コード例 #5
0
        public static WeServer <T> Query <T>(string query, string category, float latitude, float longitude)
        {
            WeSemanticRequest request = new WeSemanticRequest(query, category, latitude, longitude);
            WeServer <T>      result  = WeUtil.PostToUri(url, request.WriteJson(), new WeServer <T>());

            return(result);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
ファイル: WeStock.cs プロジェクト: hkmujj/zllinmitu
        public WeixinResult Reduce()
        {
            string url    = WeUtil.GetUrl(WeShopConst.REDUCE_STOCK_URL);
            var    result = WeUtil.PostToUri(url, this.WriteJson(), new WeixinResult());

            return(result);
        }
コード例 #8
0
ファイル: WeUserRemark.cs プロジェクト: hkmujj/zllinmitu
        public WeixinResult Update()
        {
            string url = WeUtil.GetUrl(WeConst.REMARK_URL);

            return(WeUtil.PostToUri(url, this.WriteJson(WeConst.WRITE_SETTINGS),
                                    new WeixinResult()));
        }
コード例 #9
0
        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()));
        }
コード例 #10
0
ファイル: WeMenu.cs プロジェクト: hkmujj/zllinmitu
        private WeixinResult InternalCreateMenu(string url)
        {
            string       json   = ToJson();
            WeixinResult result = new WeixinResult();

            return(WeUtil.PostToUri(url, json, result));
        }
コード例 #11
0
ファイル: MpNewsMassMessage.cs プロジェクト: hkmujj/zllinmitu
        public MediaId UploadMessage()
        {
            string url     = WeUtil.GetUrl(WeConst.NEWS_MASS_URL);
            var    mediaId = WeUtil.PostToUri(url, this.WriteJson(), new MediaId());

            return(mediaId);
        }
コード例 #12
0
ファイル: WeShelf.cs プロジェクト: hkmujj/zllinmitu
        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);
        }
コード例 #13
0
        public static IEnumerable <WeProduct> Query(ProductStatus status)
        {
            string          url     = WeUtil.GetUrl(WeShopConst.PRODUCT_STATUS_URL);
            WeProductStatus request = new WeProductStatus(status);
            var             result  = WeUtil.PostToUri(url, request.WriteJson(), new WeProductList());

            return(result.ProductsInfo);
        }
コード例 #14
0
ファイル: WeShelf.cs プロジェクト: hkmujj/zllinmitu
        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);
        }
コード例 #15
0
        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);
        }
コード例 #16
0
        public static WeixinResult Delete(int groupId)
        {
            string    url    = WeUtil.GetUrl(WeShopConst.DELETE_GROUP_URL);
            WeGroupId id     = new WeGroupId(groupId);
            var       result = WeUtil.PostToUri(url, id.WriteJson(), new WeixinResult());

            return(result);
        }
コード例 #17
0
        public static WeMerchantGroup Query(int groupId)
        {
            string    url     = WeUtil.GetUrl(WeShopConst.GROUP_ID_URL);
            WeGroupId request = new WeGroupId(groupId);
            var       result  = WeUtil.PostToUri(url, request.WriteJson(), new WeMerchantGroupFetchData());

            return(result.GroupDetail);
        }
コード例 #18
0
        public WeProduct Insert()
        {
            string url    = WeUtil.GetUrl(WeShopConst.ADD_PRODUCT_URL);
            var    result = WeUtil.PostToUri(url, this.WriteJson(), new WeProductId());

            ProductId = result.ProductId;
            return(this);
        }
コード例 #19
0
        public string CardCreate()
        {
            string url     = WeUtil.GetUrl(WeCardConst.CARD_CREATE);
            WeCard request = new WeCard(this);
            var    result  = WeUtil.PostToUri(url, request.WriteJson(), new WeCardId());

            return(result.CardId);
        }
コード例 #20
0
ファイル: WeShelf.cs プロジェクト: hkmujj/zllinmitu
        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);
        }
コード例 #21
0
        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));
        }
コード例 #22
0
        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);
        }
コード例 #23
0
        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);
        }
コード例 #24
0
        public static WeProduct Query(string productId)
        {
            TkDebug.AssertArgumentNullOrEmpty(productId, "productId", null);
            string      url     = WeUtil.GetUrl(WeShopConst.QUERY_PRODUCT_URL);
            WeProductId request = new WeProductId(productId);
            var         result  = WeUtil.PostToUri(url, request.WriteJson(), new WeProduct());

            return(result);
        }
コード例 #25
0
        public static WeixinResult UpdateStatus(string productId, ProductStatus status)
        {
            TkDebug.AssertArgumentNullOrEmpty(productId, "productId", null);
            string             url     = WeUtil.GetUrl(WeShopConst.PRODUCT_SHELF_URL);
            WeProductModStatus request = new WeProductModStatus(status, productId);
            var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult());

            return(result);
        }
コード例 #26
0
ファイル: CorpApp.cs プロジェクト: hkmujj/zllinmitu
        public WeixinResult Update()
        {
            string url = WeCorpUtil.GetCorpUrl(WeCorpConst.AGENT_SET,
                                               WeixinSettings.Current.CorpUserManagerSecret);
            CorpAppUpdateInfo updateInfo = new CorpAppUpdateInfo(this);
            WeixinResult      result     = WeUtil.PostToUri(url, updateInfo.WriteJson(), new WeixinResult());

            return(result);
        }
コード例 #27
0
        public WeixinResult Send()
        {
            string       url    = WeUtil.GetUrl(WeConst.SERVICE_URL);
            WeixinResult result = new WeixinResult();

            result = WeUtil.PostToUri(url, ToJson(), result);

            return(result);
        }
コード例 #28
0
        public static WeSubCategoryList QueryAllSubCategories(string cateId)
        {
            TkDebug.AssertArgumentNullOrEmpty(cateId, "cateId", null);

            string       url     = WeUtil.GetUrl(WeShopConst.ALL_SUB_CATE_URL);
            WeCategoryId request = new WeCategoryId(cateId);
            var          result  = WeUtil.PostToUri(url, request.WriteJson(), new WeSubCategoryList());

            return(result);
        }
コード例 #29
0
        public static WeCardInfo CardQuery(string cardId)
        {
            TkDebug.AssertArgumentNullOrEmpty(cardId, "cardId", null);

            string   url     = WeUtil.GetUrl(WeCardConst.GET_CARD);
            WeCardId request = new WeCardId(cardId);
            var      result  = WeUtil.PostToUri(url, request.WriteJson(), new WeCard());

            return(result.Card);
        }
コード例 #30
0
        public static WeServer <T> Query <T>(string query, string category, string city, string region)
        {
            WeSemanticRequest request = new WeSemanticRequest(query, category, city)
            {
                Region = region
            };
            WeServer <T> result = WeUtil.PostToUri(url, request.WriteJson(), new WeServer <T>());

            return(result);
        }