public void TestSetKeyWord() { var keywordList = new KeyWordInfo(); keywordList.ReplyId = "101E5AFA0D4E4CA9B738323A4B108357"; keywordList.KeyWord = "团购test"; keywordList.BeLinkedType = 2; keywordList.ApplicationId = "386D08D106C849A9ACAA6E493D23E853"; keywordList.ReplyType = 1; keywordList.DisplayIndex = 10; keywordList.Text = "xxxxx"; var rp = new SetKeyWordRP { }; rp.KeyWordList = keywordList; var request = new APIRequest <SetKeyWordRP> { CustomerID = CustomerId, Parameters = rp }; var rsp = APIClientProxy.CallAPI <SetKeyWordRP, SetKeyWordRD>(APITypes.Product, "WX.KeyWord.SetKeyWord", request); Console.WriteLine(rsp.ToJSON()); }
public void TestSaveDefaultKeyWord() { var textidInfo = new List <MaterialTextIdInfo> { new MaterialTextIdInfo() { TestId = "009C41874D634C888547C9EA35F1ADCA" }, new MaterialTextIdInfo() { TestId = "08CCF3FF2C2E4884B3839EEC2AA4B2BC" } }; var keywordList = new KeyWordInfo { ReplyId = "265B1657733C4DF38C9DB567CBA1105B", KeyWord = "分享团购test", BeLinkedType = 2, ApplicationId = "386D08D106C849A9ACAA6E493D23E853", ReplyType = 3, DisplayIndex = 10, KeywordType = 2, MaterialTextIds = textidInfo.ToArray() }; var rp = new SetKeyWordRP { }; rp.KeyWordList = keywordList; var request = new APIRequest <SetKeyWordRP> { CustomerID = CustomerId, Parameters = rp }; var rsp = APIClientProxy.CallAPI <SetKeyWordRP, SetKeyWordRD>(APITypes.Product, "WX.KeyWord.SaveDefaultKeyWord", request); Console.WriteLine(rsp.ToJSON()); }