Crates.io | vndb_rs |
lib.rs | vndb_rs |
version | 0.1.1 |
source | src |
created_at | 2020-05-18 19:06:51.065424 |
updated_at | 2020-05-18 19:17:48.155076 |
description | Bare-bones VNDB api |
homepage | https://github.com/Forlos/vndb_rs |
repository | https://github.com/Forlos/vndb_rs |
max_upload_size | |
id | 243139 |
size | 136,101 |
Bare-bones VNDB api
It is recommended to write higher level wrapper around this library rather than using it directly.
Requires Rust 1.42
[dependencies]
vndb_rs = "0.1"
All api actions
TLS support
Async
For now creating TCP stream is on user side. This is subject to change.
use std::net::TcpStream;
use vndb_rs::{
API_URL,
sync::client::Client,
};
let mut client = Client::new(TcpStream::connect(API_URL).unwrap());
let response = client.login();
println!("{:#?}", response);
let response = client.get_dbstats();
println!("{:#?}", response);
use std::net::TcpStream;
use vndb_rs::{
API_URL,
sync::client::Client,
get::vn::VN_FLAGS,
};
let mut client = Client::new(TcpStream::connect(API_URL).unwrap());
let response = client.login();
println!("{:#?}", response);
let response = client.get_vn(&VN_FLAGS, "(id=6540)".to_owned(), None);
println!("{:#?}", response);
use std::net::TcpStream;
use vndb_rs::{
API_URL,
sync::client::Client,
common::set::ulist::UListFields,
};
let mut client = Client::new(TcpStream::connect(API_URL).unwrap());
let response = client.login_with_credentials("username", "password");
println!("{:#?}", response);
let response = client.set_ulist(
"17".to_owned(),
UListFields::new(None, None, None, Some(85), None),
);
println!("{:#?}", response);