1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
mod client;
mod types;
pub use crate::client::Client;
pub use crate::types::JsonDocument;
pub use crate::types::LinksObject;
pub use crate::types::ResourceObject;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error(transparent)]
Reqwest(#[from] reqwest::Error),
}
#[cfg(test)]
mod tests {
use super::*;
const RESOURCE_OBJECT_JSON: &str = include_str!("../test_data/resource_object.json");
#[test]
fn parse_resource_object() {
let _resource_object: ResourceObject<serde_json::Value> =
serde_json::from_str(RESOURCE_OBJECT_JSON).expect("failed to parse resource object");
}
}