WeixinApi.class.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?php
  2. namespace Cas\Dao;
  3. /**
  4. *
  5. * 微信公众平台接口
  6. * @author lishumingoo@gmail.com
  7. */
  8. class WeixinApi {
  9. /**
  10. *
  11. * 创建二维码ticket接口
  12. * @var string
  13. */
  14. static public $create_ticket_api = "https://api.weixin.qq.com/cgi-bin/qrcode/create";
  15. /**
  16. *
  17. * 通过ticket换取二维码接口
  18. * @var string
  19. */
  20. static public $exchange_qrcode_api = "https://mp.weixin.qq.com/cgi-bin/showqrcode";
  21. /**
  22. *
  23. * 二维码有效时间
  24. * @var string
  25. */
  26. static public $expire_seconds = 1800;
  27. /**
  28. *
  29. * 创建分组
  30. * http请求方式: POST
  31. * @var string
  32. */
  33. static public $create_group = "https://api.weixin.qq.com/cgi-bin/groups/create";
  34. /**
  35. *
  36. * 查询所有分组
  37. * http请求方式: GET
  38. * @var string
  39. */
  40. static public $search_all_groups = "https://api.weixin.qq.com/cgi-bin/groups/get";
  41. /**
  42. *
  43. * 查询用户所在分组
  44. * http请求方式: POST
  45. * @var string
  46. */
  47. static public $search_member_groupid = "https://api.weixin.qq.com/cgi-bin/groups/getid";
  48. /**
  49. *
  50. * 修改分组名
  51. * http请求方式: POST
  52. * @var string
  53. */
  54. static public $update_group_name = "https://api.weixin.qq.com/cgi-bin/groups/update";
  55. /**
  56. *
  57. * 移动用户分组
  58. * http请求方式: POST
  59. * @var string
  60. */
  61. static public $update_member_group = "https://api.weixin.qq.com/cgi-bin/groups/members/update";
  62. /**
  63. *
  64. * 获取用户基本信息
  65. * http请求方式: GET
  66. * @var string
  67. */
  68. static public $get_user_info = "https://api.weixin.qq.com/cgi-bin/user/info";
  69. /**
  70. *
  71. * 获取关注者列表
  72. * http请求方式: GET
  73. * @var string
  74. */
  75. static public $gets_openids_list = "https://api.weixin.qq.com/cgi-bin/user/get";
  76. /**
  77. *
  78. * 自定义菜单创建接口
  79. * http请求方式:POST
  80. * @var string
  81. */
  82. static public $create_menu = "https://api.weixin.qq.com/cgi-bin/menu/create";
  83. /**
  84. *
  85. * 删除自定义菜单接口
  86. * @var string
  87. */
  88. static public $delete_menu = "https://api.weixin.qq.com/cgi-bin/menu/delete";
  89. /**
  90. *
  91. * 上传多媒体文件
  92. * http请求方式: POST/FORM
  93. * @var string
  94. */
  95. static public $mediaUpload = "http://file.api.weixin.qq.com/cgi-bin/media/upload";
  96. /**
  97. *
  98. * 发送客服消息
  99. * http请求方式: POST
  100. * @var string
  101. */
  102. static public $sendMessage = "https://api.weixin.qq.com/cgi-bin/message/custom/send";
  103. /**
  104. *
  105. * 模板消息
  106. * http请求方式:POST
  107. * @var string
  108. */
  109. static public $templateSend = "https://api.weixin.qq.com/cgi-bin/message/template/send";
  110. /**
  111. *
  112. * 上传图文消息素材
  113. * http请求方式:POST
  114. * @var string
  115. */
  116. static public $uploadNews = "https://api.weixin.qq.com/cgi-bin/media/uploadnews";
  117. /**
  118. * 分组群发消息
  119. * http请求方式: POST
  120. * @var string
  121. */
  122. static public $sendMsgByGroup = "https://api.weixin.qq.com/cgi-bin/message/mass/sendall";
  123. /**
  124. * openid列表群发消息
  125. * http请求方式: POST
  126. * @var string
  127. */
  128. static public $sendMsgByOpenids = "https://api.weixin.qq.com/cgi-bin/message/mass/send";
  129. }