Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vityafx/grammarbot-io
A rust grammarly bindings
https://github.com/vityafx/grammarbot-io
grammar grammarly rust
Last synced: about 2 months ago
JSON representation
A rust grammarly bindings
- Host: GitHub
- URL: https://github.com/vityafx/grammarbot-io
- Owner: iddm
- License: mit
- Created: 2019-05-31T06:57:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-05T17:53:41.000Z (10 months ago)
- Last Synced: 2024-05-02T04:54:47.229Z (5 months ago)
- Topics: grammar, grammarly, rust
- Language: Rust
- Size: 24.4 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![Build status](https://api.travis-ci.com/iddm/grammarbot-io.svg?branch=master)](https://travis-ci.com/iddm/grammarbot-io)
[![Crates](https://img.shields.io/crates/v/grammarbot-io.svg)](https://crates.io/crates/grammarbot-io)
[![Docs](https://docs.rs/grammarbot-io/badge.svg)](https://docs.rs/grammarbot-io)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)# Grammarbot.io
Easy to use API for performing requests to the [GrammarBot.io](https://grammarbot.io) API for checking your grammar in your sentences.# Usage
1. [Obtain the API key](https://www.grammarbot.io/signup)
2. Use the library:```rust,no_run
fn main() {
let string = "Hello this grammarbot-io world!";
let mut r = grammarbot-io::Request::from(string);
// With an API key:
println!("Response: {:#?}", r.api_key("99999999").send());
}
```# Examples
You may run an example which uses an environment variable `API_KEY`:```rust,no_run
fn main() {
use std::env;let string = "Hello this grammarbot-io world!";
let mut r = grammarbot-io::Request::from(string);
// With an API key:
println!(
"Response: {:#?}",
r.api_key(env::var("API_KEY").expect("The API_KEY variable should be set."))
.send()
);
}
```by running
```
API_KEY= cargo run --example run_with_env
```# Features
The crate contains the only one feature: **client** which currently uses
`reqwest` crate to perform requests. If you don't want to use this feature,
or you don't want the crate to fetch the network-related dependencies and link
against them, you may perform the requests yourself, using the `HttpRequest`
structure, which contains all necessary information to perform the request, and
can be easily created from the `grammarbot-io::Request` object.# License
[This project is licensed under the MIT license.](LICENSE)