A Rust API wrapper for lbrynet
Cargo.toml
dependenciestoml
lbry-rs = "0.0.1"
bash
$ git clone https://github.com/zxawry/lbry-rs
Cargo.toml
dependenciestoml
lbry-rs = {path = "{path-to-where-you-cloned-the-repository}"}
```rust extern crate lbry_rs;
use lbry_rs::LbrynetApi;
//re-exported from serdejson use lbryrs::{Value, json};
fn main() { //instantiate a lbry client let mut lbry = LbrynetApi::new();
//make requests by providing the method and params with cURL command-line syntax
//params must be of the type serde_json::Value so use json! macro for conversion
let result0: Value = lbry.call("status", json!({}));
let result1: Value = lbry.call("resolve", json!({"urls":"lbrytv"}));
println!("{}", result0);
println!("{}", result1);
} ```
Note that lbrynet
must be up and running, to use this API wrapper.
MIT License