perspective_api 1.0.0

An unopinionated client and a somewhat opinionated service for the Perspective API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::client::PerspectiveClient;

mod analyze_comment;
mod request_builder;

pub use request_builder::AnalyzeCommentRequestBuilder;
pub use request_builder::Attribute;

/// A wrapper for the `PerspectiveClient`, which is extended with convenience functions.
pub struct PerspectiveService {
    perspective_client: PerspectiveClient,
}

impl PerspectiveService {
    pub fn new(api_key: &str) -> Self {
        Self { perspective_client: PerspectiveClient::new(api_key) }
    }
}