poststation_api_icd/lib.rs
1//! API types and interfaces for interacting with Poststation
2//!
3//! This crate currently documents two main APIs:
4//!
5//! * A "postcard-rpc over sockets" API that is use for the Rust SDK and the CLI interface
6//! * A "web tech" API, oriented towards REST and WebSockets that uses JSON for data.
7//!
8//! If you are communicating with Poststation from the Rust language, it is recommended to
9//! use the postcard-rpc interface, generally through the `poststation-sdk` crate. If you are
10//! using another language, you will probably want to use the REST flavored API.
11//!
12//! These different flavors of APIs will *generally* have similar interfaces, but the specific
13//! format used in either may vary based on the realities of the interfaces. As an example, the
14//! REST API may contain some data in the query parameters, rather than in the body of the request,
15//! and may prefer encoding serial numbers as hex strings instead of a numerical `u64`, due to
16//! the use of floating point numbers in JS itself as well as many JSON libraries.
17
18pub mod postsock;
19
20#[cfg(feature = "rest-api")]
21pub mod rest;