grammarbot 0.1.1

API bindings for grammarbot.io
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate grammarbot;
use grammarbot::{types::Match, Client, Result};

#[test]
fn test_check() -> Result<()> {
    let client = Client::new(env!("API_KEY"));
    let response = client.check("I can't remember how to go their.")?;
    match response.matches[0] {
        Match {
            offset: 27,
            length: 5,
            ..
        } => Ok(()),
        _ => panic!("wrong response"),
    }
}