ApiGoodsspecPush.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using WdtSdk;
  7. namespace ApiGoodsspecPush
  8. {
  9. class ApiGoodsspecPush
  10. {
  11. static void Main(string[] args)
  12. {
  13. WdtClient client = new WdtClient();
  14. client.sid = "";
  15. client.appkey = "";
  16. client.appsecret = "";
  17. client.gatewayUrl = "http://121.41.177.115/openapi2/api_goodsspec_push.php";
  18. var api_goods_info = new
  19. {
  20. platform_id = "127",
  21. shop_no = "octmami",
  22. goods_list = new[]
  23. {
  24. new
  25. {
  26. goods_id="6543217612345",
  27. spec_id = "732176432",
  28. goods_no = "myxx",
  29. spec_no = "myxx",
  30. status = "1"
  31. },
  32. new
  33. {
  34. goods_id="87654123787",
  35. spec_id = "45687654",
  36. goods_no = "dshg",
  37. spec_no = "dshg",
  38. status = "1"
  39. },
  40. new
  41. {
  42. goods_id="87654322355",
  43. spec_id = "234567876",
  44. goods_no = "mhgs",
  45. spec_no = "mhgs",
  46. status = "1"
  47. }
  48. }
  49. };
  50. string json = api_goods_info.ToJsonString();
  51. client.putParams("api_goods_info", json);
  52. string result = client.wdtOpenapi();
  53. Console.WriteLine(result);
  54. Console.ReadKey();
  55. }
  56. }
  57. }