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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
use ;
/// Response wrapping a single Zotero object with its sync version header.
///
/// Used by endpoints that return one JSON object (not an array) and include
/// a `Last-Modified-Version` response header — e.g. fulltext, deleted objects,
/// and settings.
///
/// # Example
///
/// ```no_run
/// # async fn example() -> papers_zotero::Result<()> {
/// use papers_zotero::{ZoteroClient, DeletedParams};
///
/// let client = ZoteroClient::from_env()?;
/// let resp = client.get_deleted(&DeletedParams::builder().since(0u64).build()).await?;
/// println!("Deleted {} items as of version {:?}", resp.data.items.len(), resp.last_modified_version);
/// # Ok(())
/// # }
/// ```
/// Paginated response wrapping Zotero array results with header metadata.
///
/// Zotero API responses are raw JSON arrays `[...]` with pagination info in
/// HTTP headers (`Total-Results`, `Last-Modified-Version`). This struct
/// combines both into a single type.
///
/// # Example
///
/// ```no_run
/// # async fn example() -> papers_zotero::Result<()> {
/// use papers_zotero::{ZoteroClient, ItemListParams};
///
/// let client = ZoteroClient::from_env()?;
/// let resp = client.list_items(&ItemListParams::default()).await?;
/// println!("Total: {:?}, got: {}", resp.total_results, resp.items.len());
/// # Ok(())
/// # }
/// ```