luno-rs 0.1.0

A lightweight Rust wrapper for Luno API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub struct Credential {
    pub key_id: String,
    pub key_secret: String,
}

impl Credential {
    pub fn new(key_id: String, key_secret: String) -> Self {
        Credential { key_id, key_secret }
    }

    pub fn get_basic_auth(&self) -> String {
        base64::encode(format!("{}:{}", self.key_id, self.key_secret))
    }
}