[][src]Struct zotero::ZoteroInit

pub struct ZoteroInit<'a> {
    pub library_type: Option<LibraryType<'a>>,
}

Create a Zotero client for a group library or a user library.

let z : Zotero = ZoteroInit::set_user("123456789", "bZARysJ579K5SdmYuaAJ");

// Perform some operation with Zotero

let items = z.get_items(None);

for item in items {
    println!("{:#?}", item)
}

Fields

library_type: Option<LibraryType<'a>>

Methods

impl<'a> ZoteroInit<'a>[src]

pub fn set_group<S: Into<Option<&'a str>>>(
    group_id: &'a str,
    api_key: S
) -> Zotero<'a>
[src]

Create a Zotero client for a group library. According to group policy API key might be optional.

// With an API key
let z = ZoteroInit::set_group("123456789", "bZARysJ579K5SdmYuaAJ");

// Without API key
let z = ZoteroInit::set_group("123456789", None);

pub fn set_user(user_id: &'a str, api_key: &'a str) -> Zotero<'a>[src]

Create a Zotero client for a user library.

let z = ZoteroInit::set_user("123456789", "bZARysJ579K5SdmYuaAJ");

Trait Implementations

impl<'a> PartialEq<ZoteroInit<'a>> for ZoteroInit<'a>[src]

impl<'a> Debug for ZoteroInit<'a>[src]

Auto Trait Implementations

impl<'a> Send for ZoteroInit<'a>

impl<'a> Sync for ZoteroInit<'a>

impl<'a> Unpin for ZoteroInit<'a>

impl<'a> UnwindSafe for ZoteroInit<'a>

impl<'a> RefUnwindSafe for ZoteroInit<'a>

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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