civic_sip

Crates.iocivic_sip
lib.rscivic_sip
version0.1.2
sourcesrc
created_at2019-06-10 15:15:58.620391
updated_at2019-06-17 15:54:01.209679
descriptionSDK of Civic hosted SIP API
homepage
repositoryhttps://github.com/pierozi/rust-civic-sip
max_upload_size
id140218
size15,651
Pierre Tomasina (Pierozi)

documentation

https://docs.rs/civic_sip

README

Rust CIVIC SIP API

badge crate Docs BSD-3-Clause licensed

Rust Wrapper for the Civic hosted SIP API. (see docs.civic.com)

NON OFFICIAL Rust library based on the official Node.js wrapper (see npm-civic-sip-api)

Installation

Add the following to Cargo.toml:

civic_sip = "0.1"

How to use

extern crate civic_sip as civic;
use civic::{CivicSip, CivicSipConfig};

let config: CivicSipConfig = CivicSipConfig {
    app_id: dotenv!("CIVIC_APP_ID"),
    app_secret: dotenv!("CIVIC_APP_SECRET"),
    private_key: dotenv!("CIVIC_PRIVATE_KEY"),
    proxy: None,
};

let sip: CivicSip = CivicSip::new(config);
let data: serde_json::Value = sip.exchange_code("AC JWT Token return by CIVIC Frontend oAuth").unwrap();

License

civic-sip is distributed under the terms of either the BSD-3-Clause license. See LICENSE for details.

Commit count: 12

cargo fmt