#discord #discord-api #twilight

twilight-model

Discord API models for the Twilight ecosystem

14 releases

new 0.2.3 Nov 25, 2020
0.2.2 Nov 20, 2020
0.2.0 Oct 30, 2020
0.1.5 Nov 7, 2020
0.0.0 Aug 30, 2020

#21 in WebSocket

Download history 11/week @ 2020-08-27 3/week @ 2020-09-03 105/week @ 2020-09-10 116/week @ 2020-09-17 77/week @ 2020-09-24 36/week @ 2020-10-01 73/week @ 2020-10-08 151/week @ 2020-10-15 166/week @ 2020-10-22 140/week @ 2020-10-29 138/week @ 2020-11-05 290/week @ 2020-11-12 262/week @ 2020-11-19

526 downloads per month
Used in 11 crates (10 directly)

ISC license

480KB
13K SLoC

twilight-model

discord badge github badge license badge rust badge

See the 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.

License

ISC

Dependencies

~1.1–1.8MB
~38K SLoC