Getting Started ​
The notionrs crate can be added in the same way as other common crates. The following steps outline the general process.
Installation ​
To add this crate, use the following command:
cargo add notionrs
Alternatively, add the following section to your Cargo.toml
file:
[dependencies]
notionrs = "1"
TIP
To search the latest version of this crate, use the following command:
cargo search notionrs
Alternatively, you can find more detailed information on crates.io.
Usage with Async Runtime ​
The notionrs
crate is asynchronous by design, so you will need to use it within an async runtime. While you have the freedom to choose any async runtime (such as tokio or async-std), here we provide an example using tokio
, which is one of the most popular choices in the Rust ecosystem.
To use tokio
, you can add it to your project with the following command:
cargo add tokio --features full
Alternatively, you can add it manually to your Cargo.toml
:
[dependencies]
tokio = { version = "1", features = ["full"] }
notionrs = "1"
INFO
You can also use other async runtimes like async-std
. Just make sure to adapt the runtime setup according to the runtime you choose. However, the examples in this documentation will assume you are using tokio
.