discord-bots-org-0.1.0 doesn't have any documentation.
An unofficial Rust library acting as a wrapper around the Discord Bot List API, offering implementations for both sync and async reqwest (v0.9).
Compile features
- reqwest-sync-support: Compliles with sync
reqwest
support (default) - reqwest-async-support: Compiles with async
reqwest
support
Note that reqwest-async-support
requires nightly for the unstable
core::future
API.
Installation
This library requires at least Rust 1.31.0.
Add the following to your Cargo.toml
file:
[]
= "0.1"
To enable both async reqwest-async
and reqwest-sync
support:
[]
= "0.1"
= ["reqwest-async-support", "reqwest-sync-support"]
To enable reqwest-async-support
but not reqwest-sync-support
:
[]
= "0.1"
= false
= ["reqwest-async-support"]
Examples
Using reqwest synchronously, request a bot by ID:
extern crate discord_bot_list;
extern crate reqwest;
use ReqwestSyncClient as ApiClient;
use Client as ReqwestClient;
use ;
Examples are sparse for asynchronous reqwest. It is assumed that if you're using unstable asynchronous Rust APIs that you're already proficient in them.
For more examples, refer to the examples folder.
License
ISC. View the full license here.