rowrap 0.0.0

A wrapper for the Roblox API.
Documentation
use crate::utils::Session;
use anyhow::Error;

pub struct Client {
    session: Session,
}

impl Client {
    pub fn new() -> Self {
        Self {
            session: Session::new(),
        }
    }

    pub async fn set_cookie(mut self, cookie: &String) -> Result<Self, Error> {
        self.session.set_cookie(cookie.to_owned()).await?;
        Ok(self)
    }

    pub fn get_session(&self) -> &Session {
        &self.session
    }
}

impl Default for Client {
    fn default() -> Self {
        Self::new()
    }
}