[−][src]Struct domo_pitchfork::pitchfork::UsersRequestBuilder
Request Builder for all User API interactions
Fields
auth: &'t str
method: Method
url: String
resp_t: PhantomData<*const T>
body: Option<String>
Methods
impl<'t> UsersRequestBuilder<'t, User>
[src]
pub fn info(self, user_id: u64) -> Result<User, PitchforkError>
[src]
Returns a user object if valid user ID was provided. When requesting, if the user ID is related to a user that has been deleted, a subset of the user information will be returned, including a deleted property, which will be true.
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let user_id = 123; // user id for user to get details for. let user_info = domo.users().info(user_id)?; println!("User Details: \n{:#?}", user_info);
pub fn list(self, limit: u32, offset: u32) -> Result<Vec<User>, PitchforkError>
[src]
List Users starting from a given offset up to a given limit. Max limit is 500. offset is the offset of the user ID to begin list of users within the response.
Example
use domo_pitchfork::pitchfork::DomoPitchfork; let domo = DomoPitchfork::with_token("token"); let list = domo.users().list(5,0)?; list.iter().map(|u| println!("User Name: {}", u.name.as_ref().unwrap()));
pub fn create(self, user: &User) -> Result<User, PitchforkError>
[src]
pub fn delete(self, user_id: u64) -> Result<(), PitchforkError>
[src]
Delete the User for the given id. This is destructive and cannot be reversed.
Example
let domo = DomoPitchfork::with_token(&token); let user_id = 123; // user id of user to delete. // if it fails to delete, print err msg. if let Err(e) = domo.users().delete(user_id) { println!("{}", e) }
pub fn modify(self, user_id: u64, user: &User) -> Result<(), PitchforkError>
[src]
Update an existing user. Known Limitation: as of 4/10/19 all user fields are required by the Domo API
Trait Implementations
impl<'t, T> BaseRequest for UsersRequestBuilder<'t, T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn auth(&self) -> &str
[src]
fn url(&self) -> &str
[src]
fn method(&self) -> Method
[src]
fn body(&self) -> Option<String>
[src]
impl<'t, T> DomoRequest<T> for UsersRequestBuilder<'t, T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn run(&self) -> Result<T, PitchforkError> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn retrieve_and_deserialize_json(&self) -> Result<T, PitchforkError> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn send_csv(&self) -> Result<Response, PitchforkError>
[src]
fn send_json(&self) -> Result<Response, PitchforkError>
[src]
impl<'t, T> From<DomoRequestBuilder<'t, T>> for UsersRequestBuilder<'t, T> where
T: DeserializeOwned,
[src]
T: DeserializeOwned,
fn from(drb: DomoRequestBuilder<'t, T>) -> Self
[src]
Auto Trait Implementations
impl<'t, T> !Send for UsersRequestBuilder<'t, T>
impl<'t, T> !Sync for UsersRequestBuilder<'t, T>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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 for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto for T where
U: TryFrom<T>,
U: TryFrom<T>,