蜂玩API

蜂蜂帮玩HTTP REST API接口说明


⬇️ 多语言demo下载

<p>[TOC]</p> <ul> <li>如果下方没有您使用的语言,而恰好您写了,欢迎与我们共享(联系客服),我们有礼品相送。</li> </ul> <h6>易语言 demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ 易语言&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=e_fengwan.zip">https://feng.suanst.com/demo.sa?file=e_fengwan.zip</a> &quot;易语言demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;蜂玩同步上传图片()&lt;/span&gt; &gt; 利用 精易模块 v11.0.5 的“网页_访问S”函数发送 http 数据 <strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销,兼容文件、字节集方式传图片数据 例子程序利用了模块的 图片&amp;#95;转换1 将图片转为 JPG 格式(可改参数不压缩) 更新时间 2023.6.18</h2> </li> </ul> <h6>火山软件 demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ 火山软件&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=huoshan_fengwan.zip">https://feng.suanst.com/demo.sa?file=huoshan_fengwan.zip</a> &quot;火山demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;类_蜂玩答题.上传图片 ()&lt;/span&gt; &gt; 依赖模块:&quot;Curl网络传输&quot; &quot;JSON数据访问支持&quot; &quot;CxImage图像处理支持&quot; &quot;OpenSSL&quot; 都是火山官方模块,请自行添加。<strong>base64</strong> 方式上传图片数据 提供作者:暖一杯茶 20231204 更新时间 2023.12.4</h2> </li> </ul> <h6>Lua demo</h6> <ul> <li>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ Lua 语言&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=lua_fengwan.zip">https://feng.suanst.com/demo.sa?file=lua_fengwan.zip</a> &quot;Lua语言demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot;&gt;Fengwan.sendfileex()&lt;/span&gt; &gt; 利用系统 curl 发送 http 数据,<strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销 是按键精灵lua插件的复刻版,理论上支持 各种手机精灵 暂时发现不支持 安卓 8.0 及以下系统,如需支持老系统安卓,请参考“懒人精灵lua”、“触动精灵lua” 更新时间 2023.7.2 <strong>代码说明:</strong> 1、需要查看或修改 function Fengwan.temppath() 函数 <pre><code class="language-lua">--如果您的系统非安卓,需要修改这里返回的路径 function Fengwan.temppath() --函数作用:返回一个创建临时文件的目录 return &amp;quot;/sdcard/&amp;quot; --具体路径可由系统、和文件访问权限定义( IOS 可以为 &amp;quot;/private/var/&amp;quot; ) end</code></pre> <pre><code class="language-lua">-- 触动精灵调用,可在 fengwan.lua 文件最后加入以下测试代码 local re =Fengwan.sendfileex(&amp;quot;密码串&amp;quot;,&amp;quot;1001&amp;quot;,30,&amp;quot;你好世界&amp;quot;,0,&amp;quot;/sdcard/yzm.png&amp;quot;,&amp;quot;1001|9A42B0F1BD994C75&amp;quot;,30) -- 利用正则获取各个字段的值(或者用精灵支持的json解析函数) local tid = string.match(re,&amp;quot;\&amp;quot;tid\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) local answer = string.match(re,&amp;quot;\&amp;quot;answer\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) local errmsg = string.match(re,&amp;quot;\&amp;quot;errmsg\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) local warnmsg = string.match(re,&amp;quot;\&amp;quot;warnmsg\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) if tid ~=nil then errmsg = string.sub(tid,6+#&amp;quot;tid&amp;quot;,-2) else errmsg=&amp;quot;&amp;quot; end if errmsg ~=nil then errmsg = string.sub(errmsg,6+#&amp;quot;errmsg&amp;quot;,-2) else errmsg=&amp;quot;&amp;quot; end if warnmsg ~=nil then warnmsg = string.sub(warnmsg,6+#&amp;quot;warnmsg&amp;quot;,-2) else warnmsg=&amp;quot;&amp;quot; end if answer ~=nil then answer = string.sub(answer,6+#&amp;quot;answer&amp;quot;,-2) else answer=&amp;quot;&amp;quot; end dialog (re,3000) -- 需要判断 errmsg、warnmsg、answer 的内容,根据不同的返回值进行不同的操作 -- 返回值的可能性需同时参考 上传图片 sendfile() 和 获取答案 getanswer() -- https://www.showdoc.com.cn/fengwan/10258903646810375 -- https://www.showdoc.com.cn/fengwan/10259091235804385</code></pre> <pre><code class="language-lua">--触摸精灵调用,可在 fengwan.lua 文件最后加入以下测试代码 function main() local re = Fengwan.sendfileex(&amp;quot;密码串&amp;quot;,&amp;quot;1001&amp;quot;,30,&amp;quot;你好世界&amp;quot;,0,&amp;quot;/sdcard/yzm.png&amp;quot;,&amp;quot;1001|9A42B0F1BD994C75&amp;quot;,30) -- 利用正则获取各个字段的值 (或者用精灵支持的json解析函数) local tid = string.match(re,&amp;quot;\&amp;quot;tid\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) local answer = string.match(re,&amp;quot;\&amp;quot;answer\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) local errmsg = string.match(re,&amp;quot;\&amp;quot;errmsg\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) local warnmsg = string.match(re,&amp;quot;\&amp;quot;warnmsg\&amp;quot;: \&amp;quot;.-\&amp;quot;&amp;quot;) if tid ~=nil then errmsg = string.sub(tid,6+#&amp;quot;tid&amp;quot;,-2) else errmsg=&amp;quot;&amp;quot; end if errmsg ~=nil then errmsg = string.sub(errmsg,6+#&amp;quot;errmsg&amp;quot;,-2) else errmsg=&amp;quot;&amp;quot; end if warnmsg ~=nil then warnmsg = string.sub(warnmsg,6+#&amp;quot;warnmsg&amp;quot;,-2) else warnmsg=&amp;quot;&amp;quot; end if answer ~=nil then answer = string.sub(answer,6+#&amp;quot;answer&amp;quot;,-2) else answer=&amp;quot;&amp;quot; end logDebug(re) -- 需要判断 errmsg、warnmsg、answer 的内容,根据不同的返回值进行不同的操作 -- 返回值的可能性需同时参考 上传图片 sendfile() 和 获取答案 getanswer() -- https://www.showdoc.com.cn/fengwan/10258903646810375 -- https://www.showdoc.com.cn/fengwan/10259091235804385 end</code></pre> <hr /></li> </ul> <h6>触动精灵 demo 其他精灵参考</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:180px&quot;&gt;⬇️ 触动精灵lua&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=ts_fengwan.zip">https://feng.suanst.com/demo.sa?file=ts_fengwan.zip</a> &quot;触动精灵lua demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot;&gt;Fengwan.sendfileex()&lt;/span&gt; &gt; 使用触动精灵自带的post函数、文件 <strong>base64</strong> 函数,实现上传图片数据,兼容性好 <strong>供其他精灵参考</strong>,仅需替换 httpPost()、httpGet()、imageBase64()、urlEncoder()以及json解析函数 换成自己精灵支持的 post、get、filebase64、urlencode、json解析即可正常使用。 更新时间 2023.11.29 (之前的版本可以按如下操作修复:字段<code>timeout1=</code>应修复为<code>timeout=</code>、<code>[&amp;quot;timeout1&amp;quot;]</code>应修复为<code>[&amp;quot;timeout&amp;quot;]</code>,使用查找替换可以快速定位)</h2> </li> </ul> <h6>懒人精灵 demo 其他精灵参考</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:180px&quot;&gt;⬇️ 懒人精灵lua&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=lr_fengwan.zip">https://feng.suanst.com/demo.sa?file=lr_fengwan.zip</a> &quot;懒人精灵lua demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot;&gt;Fengwan.sendfileex()&lt;/span&gt; &gt; 使用懒人精灵自带的post函数、文件 <strong>base64</strong> 函数,实现上传图片数据,兼容性好 <strong>供其他精灵参考</strong>,仅需替换 httpPost()、httpGet()、getFileBase64()、encodeUrl()以及json解析函数 换成自己精灵支持的 post、get、filebase64、urlencode、json解析即可正常使用。 更新时间 2023.7.2</h2> </li> </ul> <h6>触摸精灵 demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:180px&quot;&gt;⬇️ 触摸精灵lua&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=te_fengwan.zip">https://feng.suanst.com/demo.sa?file=te_fengwan.zip</a> &quot;触摸精灵lua demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot;&gt;Fengwan.sendfileex()&lt;/span&gt; &gt; 使用触摸精灵v5.2自带的httpGet()、jsonDecode()、并结合 curl 插件实现 <strong>二进制</strong> 方式上传。 兼容ios、Android。但注意需要安装 curl 插件。 更新时间 2023.12.21 </h2> </li> </ul> <h6>按键精灵PC demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ 按键精灵PC&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=anjianpc_fengwan.zip">https://feng.suanst.com/demo.sa?file=anjianpc_fengwan.zip</a> &quot;按键精灵PC demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;FWsendfileex()&lt;/span&gt; &gt; 利用 WinHttp.WinHttpRequest.5.1 组件发送 http 数据。 由于按键 PC 不支持 byte 数据类型,固使用 <strong>base64</strong> 方式上传 更新时间 2023.6.21</h2> </li> </ul> <h6>按键精灵手机版 demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:180px&quot;&gt;⬇️ 按键精灵手机版&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=anjianmobile_fengwan.zip">https://feng.suanst.com/demo.sa?file=anjianmobile_fengwan.zip</a> &quot;按键精灵手机版demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot;&gt;fw_sendfileex()&lt;/span&gt; &gt; 低版本:利用按键URL库、紫猫插件 以 <strong>base64</strong> 方式上传图片,兼容性好 (兼容任何版本安卓、ios 苹果系统。注意:ios 需修改例子里面的截图保存的目录为:/private/var/yzm.png ) 普通版:使用系统的 <strong>curl</strong> 进行 <strong>二进制</strong> 方式上传,性能好(MQ代码仅做封装和示例 lua 插件是底层逻辑) 暂时发现不支持 安卓 8.0 及以下系统,有能力的开发者可以2种方案都写入,让客户选择。 更新时间 2023.7.21</h2> </li> </ul> <h6>Python demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ Python&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=python_fengwan.zip">https://feng.suanst.com/demo.sa?file=python_fengwan.zip</a> &quot;Python demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;fwsendfileex()&lt;/span&gt; &gt; fengwan.py 利用 requests 库 发送 http 数据,<strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销 利用 PIL Image 将图片转 JPEG 格式,默认进行转换(可改参数) aiofengwan.py 利用 asyncio,aiofiles,aiohttp 实现上述代码的异步协程化 更新时间 2023.6.20</h2> </li> </ul> <h6>C++ demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ C++ &lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=c_fengwan.zip">https://feng.suanst.com/demo.sa?file=c_fengwan.zip</a> &quot;C++ demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;uploadImage() 、 uploadPic()&lt;/span&gt; &gt; <strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销。 含3个demo,代码不够完善,还需结合api说明(或其他语言例子)进行深度优化。 程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式 更新时间 2023.12.2</h2> </li> </ul> <h6>C# demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ C# CShape&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=CShape_fengwan.zip">https://feng.suanst.com/demo.sa?file=CShape_fengwan.zip</a> &quot;CShape demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;fwsendfileex()&lt;/span&gt; &gt; 利用 HttpWebRequest 类 发送 http 数据,兼容 文件 或 字节数组 类型上传图片 <strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销。内含控制台、Winform 2种格式 程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式 (大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg) 更新时间 2023.6.18</h2> </li> </ul> <h6>TC demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ TC T语言&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=TC_fengwan.zip">https://feng.suanst.com/demo.sa?file=TC_fengwan.zip</a> &quot;TC demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;fw_sendfileex()&lt;/span&gt; &gt; 使用 TC库内的 httpsubmit() 发送图片 <strong>base64</strong> 格式数据,支持多线程调用 程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式 (大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg) 更新时间 2023.6.18</h2> </li> </ul> <h6>VB.NET demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ VB.NET&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=vb.net_fengwan.zip">https://feng.suanst.com/demo.sa?file=vb.net_fengwan.zip</a> &quot;VB.NET demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;fwsendfileex()&lt;/span&gt; &gt; 利用 HttpWebRequest 类 发送 http 数据,兼容 文件 或 字节数组 类型上传图片 <strong>二进制</strong> 方式上传,减少转码开销、网络 IO 传输开销。内含控制台、Winform 2种格式 程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式 (大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg) 更新时间 2023.6.18</h2> </li> </ul> <h6>VB6 demo</h6> <ul> <li> <h2>[&lt;b style=&quot;font-size:15px;display:inline-block;width:150px&quot;&gt;⬇️ VB6&lt;/b&gt;](<a href="https://feng.suanst.com/demo.sa?file=vb6_fengwan.zip">https://feng.suanst.com/demo.sa?file=vb6_fengwan.zip</a> &quot;VB6 demo下载&quot;)👉 &lt;span style=&quot;color:#a70&quot; &gt;fwsendfileex()&lt;/span&gt; &gt; 利用 WinHttp.WinHttpRequest.5.1 组件发送 http 数据,<strong>二进制</strong> 方式上传 减少转码开销、网络 IO 传输开销 程序不带图片压缩,为加快上传速度 和 减少服务器开销 建议使用 jpg 截图方式 (大漠插件使用 CaptureJpg 函数)或转换图片格式到 jpg (png转jpg、bmp转jpg) 更新时间 2023.6.21</h2> </li> </ul>

页面列表

ITEM_HTML