Struct readwise::Client[][src]

pub struct Client {
    pub access_token: String,
}

The authenticated client instance. The access_token can be obtained through Readwise.

Fields

access_token: String

Implementations

impl Client[src]

pub fn books(&self, page: i64) -> Result<Vec<Book>>[src]

Fetch all books from a specified page Builds and returns a Vec of Book structs

pub fn highlights(&self, page: i64) -> Result<Vec<Highlight>>[src]

Fetch all highlights from a specified page Builds and returns a Vec of Highlight structs

pub fn book(&self, id: i64) -> Result<Book>[src]

Fetch a single book by ID

pub fn highlight(&self, id: i64) -> Result<Highlight>[src]

Fetch a single highlight by ID

pub fn create(
    &self,
    highlights: Vec<HashMap<&str, &str>>
) -> Result<Vec<Highlight>>
[src]

Create one or more highlights and return them

pub fn update(&self, id: i64, body: HashMap<&str, &str>) -> Result<Highlight>[src]

Update a single highlight and return it

pub fn delete(&self, id: i64) -> Result<()>[src]

Delete a single highlight

Auto Trait Implementations

impl RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl UnwindSafe for Client

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.