sms77-client 0.1.0

Official API client for Sms77.io SMS Gateway.
Documentation
use ureq::{Error};
use crate::client::Client;

pub struct Balance {
    client: Client
}

impl Balance {
    pub fn new(client: Client) -> Self {
        Balance {
            client,
        }
    }

    pub fn get(&self) -> Result<f64, Error> {
        Ok(self.client.request("GET", "balance")
            .call()?
            .into_json::<f64>()?)
    }
}