rust_google_tasks
Rust Client for Google Tasks API v1
Example
[dependencies]
gtasks = "0.4"
Read tasks
// create a service
let service = gtasks::Service::new("google_token").unwrap();
// obtain tasklist id
let tasklists = service.list_tasklists(None).unwrap();
let list_id = tasklists.items[0].id.unwrap();
// print tasks from the list
let opts = gtasks::TaskOptions{
max_results: Some(5),
show_completed: Some(true),
show_hidden: Some(true),
};
let tasks = service.list_tasks(list_id, opts, None).unwrap();
if let Some(tasks) = tasks {
let items = tasks.items.unwrap();
for item in items {
println!("{:?}", item.title);
}
}
License
License under either or: