2 releases
0.0.2 | Aug 16, 2022 |
---|---|
0.0.1 | Aug 9, 2022 |
#8 in #front
128 downloads per month
1MB
22K
SLoC
front-api
A fully generated & opinionated API client for the Front API.
API Details
Contact
name | |
---|---|
Front Platform | api@frontapp.com |
Client Details
The documentation for the crate is generated along with the code to make this library easy to use.
To install the library, add the following to your Cargo.toml
file.
[dependencies]
front-api = "0.0.2"
Basic example
Typical use will require intializing a Client
. This requires
a user agent string and set of credentials.
use front_api::Client;
let client = Client::new(
String::from("api-key"),
);
Alternatively, the library can search for most of the variables required for the client in the environment:
FRONT_API_TOKEN
And then you can create a client from the environment.
use front_api::Client;
let client = Client::new_from_env();
lib.rs
:
A fully generated & opinionated API client for the Front API.
API Details
Contact
name | |
---|---|
Front Platform | api@frontapp.com |
Client Details
The documentation for the crate is generated along with the code to make this library easy to use.
To install the library, add the following to your Cargo.toml
file.
[dependencies]
front-api = "0.0.2"
Basic example
Typical use will require intializing a Client
. This requires
a user agent string and set of credentials.
use front_api::Client;
let client = Client::new(String::from("api-key"));
Alternatively, the library can search for most of the variables required for the client in the environment:
FRONT_API_TOKEN
And then you can create a client from the environment.
use front_api::Client;
let client = Client::new_from_env();
Dependencies
~37–55MB
~597K SLoC