docs.rs failed to build ift-webhook-0.2.7
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
ift-webhook-0.2.8
ift-webhook
a simple lib binding to the ifttt's webhook api.
there is a async interface can be activate in feature non-blocking
.
and a time delay trigger function for delay the trigger in feature delay
.
the blocking interface use ureq, and the non-blocking interface use reqwest internally.
about ifttt webhook usage: For example,You can call a url (supplied by ifttt) then receive a notification (could include data* you supplied) on you phone.
*sometimes you can set some json data (up to three fields in it) inside the request, which is depends on the service webhook connected with.
Installation
-
find on crates.io
-
use cargo-edit
Hot to use
blocking api
code
extern crate ift-webhook
extern crate dotenv
use *
dotenv.unwrap;
let event_name = var.unwrap;
let api_key = var.unwrap;
let client = new;
let data = new;
let res = client.trigger;
assert!
non-blocking api
Cargo.toml
={=*,= false,=["non-blocking"]}
code
extern crate ift-webhook
extern crate dotenv
use *
dotenv.unwrap;
let event_name = var.unwrap;
let api_key = var.unwrap;
let client = new;
let res = client.trigger.await;
assert!
non-blocking api with time delay
Cargo.toml
={=*,= false,=["delay"]}
code
extern crate ift-webhook
extern crate dotenv
use *
dotenv.unwrap;
let event_name = var.unwrap;
let api_key = var.unwrap;
let client = new;
let res_handler: DelayResultHandler =
client.trigger_with_delay;
///do something else
let res = res_handler.await;
assert!