Machinebox Client
machinebox is a Rust client for the machinebox.io suite of machines. It provides a simple means of accessing the machines, exposing common functionality to all machines as well as box-specific functionality. Each "box" or "box type" is separated into its own module and struct.
Modules
The following is a list of the modules corresponding to machinebox types and which ones have been implemented so far:
- Textbox
- Facebox
- Tagbox
- Videobox
- Nudebox
- Suggestionbox
- Fakebox
Usage
To use features, simply call the appropriate function on the corresponding box:
extern crate machinebox;
use Textbox;
use BoxClient;
// Make sure you actually have a textbox running here...
let tb = new;
let analysis = tb.check;
if let Ok = analysis
The above code will analyse the phrase Pay William $200 tomorrow
, flagging
tomorrow
as a date and 200
as an entity of type money
.
Notes
If you run the tests locally, you'll need RUST_TEST_THREADS=1
because the mock HTTP server
persists throughout the lifetime of the test run.