Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hhatto/pit-rs
pit in Rust
https://github.com/hhatto/pit-rs
Last synced: 2 months ago
JSON representation
pit in Rust
- Host: GitHub
- URL: https://github.com/hhatto/pit-rs
- Owner: hhatto
- License: apache-2.0
- Created: 2017-12-25T04:39:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-19T03:53:56.000Z (almost 5 years ago)
- Last Synced: 2024-10-08T14:55:54.916Z (2 months ago)
- Language: Rust
- Homepage: https://crates.io/crates/pit
- Size: 12.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# pit-rs [![Latest Version](https://img.shields.io/crates/v/pit.svg)](https://crates.io/crates/pit)
[pit](https://github.com/cho45/pit) for [Rust](https://www.rust-lang.org/)
## Usage
```toml
[dependencies]
pit = { git = "https://github.com/hhatto/pit-rs", branch = "master" }
``````rust
extern crate pit;use pit::Pit;
fn main() {
let p = Pit::new();
let config = p.get("twitter.com");
match config {
None => {
println!("not provide config value");
return;
},
Some(_) => {},
}let config = config.unwrap();
let username = config.get("username").unwrap();
let password = config.get("password").unwrap();
println!("username={}, password={}", username, password);
}
```## for developer
```
$ cargo test -- --test-threads=1
```