2 个不稳定版本
使用旧 Rust 2015
0.2.0 | 2016年12月14日 |
---|---|
0.1.0 | 2016年12月12日 |
#1232 in #service
11KB
258 代码行
Simplenote API - 链接:文档
:toc
用法
将以下行添加到您的 Cargo.toml
[source,toml]
[dependencies]
simplenote = "0.1.0"
在您的 crate 根目录中,添加以下内容
[source,rust]
extern crate simplenote;
API
pub fn new<T: Display, U: Display>(username: T, password: U) -> Result<Simplenote, simplenote::Error>;
pub fn notes(&self) -> Result<Vec<Note>, simplenote::Error>;
pub fn notes_filtered(&self, filters: Vec<Filters>) -> Result<Vec<Note>, simplenote::Error>;
pub fn get_note(&self, note_id: &str) -> Result<Note, simplenote::Error>;
pub fn get_note_version<I: Into<Option<u32>>>(&self, note_id: &str, version: I) -> Result<Note, simplenote::Error>;
pub fn add_note<I: Into<Note>>(&self, note: I) -> Result<Note, simplenote::Error>;
pub fn update_note(&self, note: &mut Note) -> Result<(), simplenote::Error>;
pub fn trash_note(&self, note_id: &str) -> Result<Note, simplenote::Error>;
pub fn delete_note(&self, note_id: &str) -> Result<(), simplenote::Error>;
依赖项
~10–19MB
~304K SLoC