#api-client #flags #cio

shippo

Shippo 的 API 客户端

27 个版本

0.1.29 2021年7月20日
0.1.28 2021年7月20日
0.1.27 2021年6月16日
0.1.23 2021年5月6日
0.1.18 2020年12月31日

#2208 in 网页编程

每月 50 次下载

Apache-2.0

68KB
1K SLoC

cio

cargo-build cargo-clippy cargo-test rustfmt cloud-run

执行 CIO 活动的辅助函数和类型。

配置

运行时标志

可以通过环境变量控制特定的运行时行为。标志默认禁用,将变量设置为 true 将启用该功能。

标志 描述
RFD_PDFS_IN_GITHUB 启用将渲染的 RFD PDF 提交回其源仓库
RFD_PDFS_IN_GOOGLE_DRIVE 启用将渲染的 RFD PDF 写入 Google Drive

该应用程序服务器及其周围环境的架构为

arch.png


lib.rs:

  • 与 Shippo API 交互的 Rust 库。
  • 有关更多信息,Shippo API 的文档可在 goshippo.com/docs/reference 上找到。
  • 示例
  • use serde::{Deserialize, Serialize};
  • use shippo::Shippo;
  • async fn get_shipments() {
  • // Initialize the Shippo client.
    
  • let shippo = Shippo::new_from_env();
    
  • // List the shipments.
    
  • let shipments = shippo.list_shipments().await.unwrap();
    
  • // Iterate over the shipments.
    
  • for shipment in shipments {
    
  •     println!("{:?}", shipment);
    
  • }
    
  • }
  • 
    

依赖项

~5–17MB
~252K SLoC