35 releases (5 breaking)
|new 0.5.0||Jun 13, 2021|
|0.4.2||May 30, 2021|
|0.3.3||Mar 14, 2021|
|0.2.7||Dec 30, 2020|
|0.2.4||Nov 29, 2020|
#5 in #twilight
1,277 downloads per month
Used in 13 crates (12 directly)
twilight documentation for more information.
twilight-model is a crate of serde models defining the Discord APIs with
few convenience methods on top of them.
These are in a single crate for ease of use, a single point of definition, and a sort of versioning of the Discord API. Similar to how a database schema progresses in versions, the definition of the API also progresses in versions.
The types in this crate are reproducible: deserializing a payload into a type, serializing it, and then deserializing it again will work.
Defined are a number of modules defining types returned by or owned by
resource categories. For example,
gateway are types used to interact with
and returned by the gateway API.
guild contains types owned by the Guild
resource category. These types may be directly returned by, built on top of,
or extended by other crates.