rust-wistia
rust-wistia is a rust crate which provides an async wrapper API that lets you easily interact
with the Wistia API.
This is inspired in part by wystia, a Python library I created for the Wistia API.
This crate works with Cargo with a Cargo.toml like:
[]
= "0.8"
= { = "1", = ["full"] }
Table of Contents
Getting Started
Getting started with the rust-wistia library is easy:
-
Set WISTIA_API_TOKEN in your environment; you can also use the
fromconstructor to explicitly set the token value. Find out more about Authentication and Access Tokens in the Wistia API Documentation. -
Add some usage to your application.
Here's an example of uploading a media, via a public URL link:
use UrlUploader; async
Examples
You can check out sample usage of API methods in the examples/ folder in the project repo on GitHub.
Dependencies and Features
This library uses only the minimum required dependencies, in order
to keep the overall size small. This crate uses hyper and hyper-rustls
internally, to make HTTPS requests to the Wistia API.
While hyper-rustls was chosen as the default TLS implementation
because it works without issue when cross-compiling for the
x86_64-unknown-linux-musl target as is common for AWS Lambda
deployments, it is still possible to instead use the native hyper-tls
implementation, which relies on OpenSSL.
To do this, disable the default "rust-tls" feature and enable the "native-tls" feature:
[]
= { = "*", = false, = ["native-tls", "logging", "serde-std"] }
Contributing
Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.
Check out the Contributing section in the docs for more info.
License
This project is proudly licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT).
rust-wistia can be distributed according to the MIT license. Contributions
will be accepted under the same license.