kintone 0.6.2

kintone REST API client
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::error::Error;

use kintone::client::{Auth, KintoneClient};

fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
    let base_url = std::env::var("KINTONE_BASE_URL").expect("KINTONE_BASE_URL is not set");
    let api_token = std::env::var("KINTONE_API_TOKEN").expect("KINTONE_API_TOKEN is not set");

    let client = KintoneClient::new(&base_url, Auth::api_token(api_token));
    let resp = kintone::v1::record::get_records(5)
        .fields(&["test_field_1", "test_field_2"])
        .send(&client)?;

    for record in resp.records {
        println!("{record:?}");
    }
    Ok(())
}