[−][src]Struct nextcloud_analytics_rs::SyncClient
A synchronous client to call the Nextcloud Analytics API.
Implementations
impl SyncClient
[src]
pub fn new<S: Into<String>>(
nextcloud_url: &str,
collection: u32,
user: S,
passwd: S
) -> Self
[src]
nextcloud_url: &str,
collection: u32,
user: S,
passwd: S
) -> Self
Create a new synchronous client to call the Nextcloud Analytics API.
nextcloud_url
is the base URL of the Nextcloud instance.collection
is the collection index, as presented by Nextcloud Analytics' interface (number in the URL).user
is the Nextcloud user's name.passwd
is an app password associaetd to the Nextcloud user's account.
pub fn send_data<S: Into<String>, F: Into<f64>>(
&self,
dimension1: S,
dimension2: S,
dimension3: F
) -> Result<(), Box<dyn Error>>
[src]
&self,
dimension1: S,
dimension2: S,
dimension3: F
) -> Result<(), Box<dyn Error>>
Sends some data to the API, the two first dimensions must be formatted as text while the last dimension must be a numerical value.
For timeline data, dimension2
must be the date in the RFC2822 format.
pub fn send_timeline_data<S: Into<String>, F: Into<f64>>(
&self,
key: S,
time: DateTime<Utc>,
value: F
) -> Result<(), Box<dyn Error>>
[src]
&self,
key: S,
time: DateTime<Utc>,
value: F
) -> Result<(), Box<dyn Error>>
Sends some timeline data to the API: the key
is the index of this piece of data,
associated to the given value
at the given time
. for the given time
.
pub fn send_timeline_now_data<S: Into<String>, F: Into<f64>>(
&self,
key: S,
value: F
) -> Result<(), Box<dyn Error>>
[src]
&self,
key: S,
value: F
) -> Result<(), Box<dyn Error>>
Sends some timeline data to the API: the key
is the index of this piece of data,
associated to the given value
at the current UTC time.
Auto Trait Implementations
impl !RefUnwindSafe for SyncClient
impl Send for SyncClient
impl Sync for SyncClient
impl Unpin for SyncClient
impl !UnwindSafe for SyncClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,