psn_rs 0.1.0

Interact with PlayStation Network API in full Rust!
Documentation
const PAGINATION_LIMIT: usize = 100;

pub(crate) struct PaginationParams {
    limit: usize,
    offset: usize,
}

impl PaginationParams {
    pub fn set_offset(&mut self, offset: usize) {
        self.offset = offset
    }

    pub fn to_params(&self) -> Vec<(&str, String)> {
        vec![
            ("limit", self.limit.to_string()),
            ("offset", self.offset.to_string()),
        ]
    }
}

impl Default for PaginationParams {
    fn default() -> Self {
        Self {
            limit: PAGINATION_LIMIT,
            offset: 0,
        }
    }
}