#dto #synology #data-transfer #api #json-response #error-code #dsm

syno_api

An incomplete set of DTOs and errors for Synology DSM APIs

7 releases

0.3.4 Dec 25, 2024
0.3.3 Dec 9, 2024
0.3.1 Jun 14, 2024
0.3.0 Apr 28, 2024
0.1.0 Apr 22, 2024

#690 in Encoding

Download history 3/week @ 2024-09-18 14/week @ 2024-09-25 8/week @ 2024-10-02 201/week @ 2024-12-04 90/week @ 2024-12-11 7/week @ 2024-12-18 153/week @ 2024-12-25

451 downloads per month
Used in 2 crates

MIT license

23KB
492 lines

syno_api

Crates.io Version

An incomplete set of data transfer objects (DTOs) and errors for Synology DSM APIs.

Features

By default, all of the following features are enabled.

  • dto - provides DTOs for various JSON responses produced by Synology DSM APIs
  • error - provides enums implementing Error and Display traits, and From/TryFrom for u16 to convert from error codes returned by the API to enum values
  • serde - adds Serialize and Deserialize trait implementations to DTOs (adds dependency on serde library).

Contributing

I would very much welcome pull requests adding more types / functionality. Current set is driven by what my other projects need from the APIs.


lib.rs:

An incomplete set of data transfer objects (DTOs) and errors for Synology DSM APIs.

Features

By default, all of the following features are enabled.

  • dto - provides DTOs for various JSON responses produced by Synology DSM APIs
  • error - provides enums implementing Error and Display traits, and From/TryFrom for u16 to convert from error codes returned by the API to enum values
  • serde - adds Serialize and Deserialize trait implementations to DTOs (adds dependency on serde library). Generic types applicable to all sub-APIs

Dependencies

~0.3–1MB
~21K SLoC