#restful #rest-api #rest #api-wrapper #api-bindings #http-api #cgminer

nightly app cgminer-rest

为cgminer提供的RESTful HTTP API包装器

1个不稳定版本

0.1.2 2018年12月17日

#1283 in HTTP服务器

GPL-3.0或更高版本

9.5MB
492 代码行

Build Status Current Crates.io Version

cgminer-rest:cgminer API的RESTful HTTP包装器

Demo

此包提供对cgminer API的RESTful HTTP包装。Cgminer有一个相当神秘的API,使用标准的基于HTTP的工具不太容易使用。使用这个工具,可以轻松地通过编程或使用UI(例如通过网页浏览器)与cgminer交互。

安装

可以使用cargo工具从crates.io安装此包

$ cargo install cgminer-rest
...
$ cgminer-rest

有关配置详细信息,请参阅Rocket.toml

示例

API

端点

🛰  Mounting /:
    => GET /version (version)
    => GET /config (config)
    => GET /summary (summary)
    => GET /devs (devs)
    => GET /devdetails (devdetails)
    => GET /stats (stats)
    => GET /coin (coin)
    => GET /usbstats (usbstats)
    => GET /lcd (lcd)
    => GET /notify (notify)
    => GET /privileged (privileged)
    => PUT /restart (restart)
    => PUT /check/<command> (check)
    => PUT /debug (debug)
    => PUT /hotplug (hotplug)
    => GET /lockstats (lockstats)
    => PUT /zero (zero)
🛰  Mounting /pools:
    => GET /pools (pools)
    => PUT /pools/<id>/switchto (switchpool)
    => PUT /pools/<id>/enable (enablepool)
    => PUT /pools/<id>/disable (disablepool)
    => POST /pools (addpool)
    => DELETE /pools/<id> (removepool)
    => PUT /pools/<id>/quota (poolquota)
🛰  Mounting /pga:
    => GET /pga/<id> (pga)
    => GET /pga/count (pgacount)
    => PUT /pga/<id>/enable (pgaenable)
    => PUT /pga/<id>/disable (pgadisable)
    => GET /pga/<id>/identify (pgaidentify)
    => PUT /pga/<id> (pgaset)
🛰  Mounting /asc:
    => GET /asc/<id> (asc)
    => GET /asc/count (asccount)
    => PUT /asc/<id>/enable (ascenable)
    => PUT /asc/<id>/disable (ascdisable)
    => GET /asc/<id>/identify (ascidentify)
    => PUT /asc/<id> (ascset)

依赖项

~10–19MB
~274K SLoC