zoho-crm

Crates.iozoho-crm
lib.rszoho-crm
version0.3.2
sourcesrc
created_at2019-11-21 19:18:42.749436
updated_at2020-04-14 15:22:20.98974
descriptionLibrary to help interact with v2 of the Zoho CRM API.
homepagehttps://github.com/rideron89/zoho-crm
repositoryhttps://github.com/rideron89/zoho-crm
max_upload_size
id183284
size48,043
Ron Rider (rideron89)

documentation

https://docs.rs/zoho-crm/0.3.1/zoho_crm

README

zoho-rs

Library to help interact with v2 of the Zoho CRM API.

Description & Examples

You can either create a client with a preset access token, or fetch a new one later on. This can be useful if you are keeping track of you access tokens in a database, for example. You will need an API client ID, secret, and refresh token.

You can read more information here: https://www.zoho.com/crm/developer/docs/api/oauth-overview.html

To handle parsing response records, you will also need deserializable objects with serde:

[dependencies]
serde = { version = "1.0", features = ["derive"] }

Example

use serde::Deserialize;
use zoho_crm::ZohoClient;

let client_id = String::from("YOUR_CLIENT_ID");
let client_secret = String::from("YOUR_CLIENT_SECRET");
let refresh_token = String::from("YOUR_REFRESH_TOKEN");

let mut client = ZohoClient::with_creds(
    None, // access token
    None, // api domain
    client_id,
    client_secret,
    refresh_token
);

#[derive(Debug, Deserialize)]
struct Account {
    id: String,
    name: String,
}

let account = client.get::<Account>("Accounts", "ZOHO_ID_HERE").unwrap();
Commit count: 68

cargo fmt