[![Build Status](https://travis-ci.org/brndnmtthws/cgminer-rest.svg?branch=master)](https://travis-ci.org/brndnmtthws/cgminer-rest) [![Current Crates.io Version](https://img.shields.io/crates/v/cgminer-rest.svg)](https://crates.io/crates/cgminer-rest) # cgminer-rest: a RESTful HTTP wrapper for the cgminer API ![Demo](/demo.gif?raw=true) This package provides a RESTful HTTP wrapper around the [cgminer](https://github.com/ckolivas/cgminer) API. Cgminer has a somewhat esoteric API, which isn't easy to use with standard HTTP-based tooling. Using this tool, it's easy to interact with cgminer programmatically or using a UI, such as through a web browser. ## Installing The package can be installed from [crates.io](https://crates.io/) using the `cargo` tool: ```ShellSession $ cargo install cgminer-rest ... $ cgminer-rest ``` See [Rocket.toml](Rocket.toml) for configuration details. ## Example ## API ### Endpoints 🛰 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/ (check) => PUT /debug (debug) => PUT /hotplug (hotplug) => GET /lockstats (lockstats) => PUT /zero (zero) 🛰 Mounting /pools: => GET /pools (pools) => PUT /pools//switchto (switchpool) => PUT /pools//enable (enablepool) => PUT /pools//disable (disablepool) => POST /pools (addpool) => DELETE /pools/ (removepool) => PUT /pools//quota (poolquota) 🛰 Mounting /pga: => GET /pga/ (pga) => GET /pga/count (pgacount) => PUT /pga//enable (pgaenable) => PUT /pga//disable (pgadisable) => GET /pga//identify (pgaidentify) => PUT /pga/ (pgaset) 🛰 Mounting /asc: => GET /asc/ (asc) => GET /asc/count (asccount) => PUT /asc//enable (ascenable) => PUT /asc//disable (ascdisable) => GET /asc//identify (ascidentify) => PUT /asc/ (ascset)