pub struct Client { /* private fields */ }
Expand description
Entrypoint for interacting with the API client.
Implementations§
Source§impl Client
impl Client
Sourcepub fn new_from_reqwest<T>(
token: T,
builder_http: ClientBuilder,
builder_websocket: ClientBuilder,
) -> Self
pub fn new_from_reqwest<T>( token: T, builder_http: ClientBuilder, builder_websocket: ClientBuilder, ) -> Self
Create a new Client struct. It takes a type that can convert into
an &str (String
or Vec<u8>
for example). As long as the function is
given a valid API key your requests will work.
Also takes reqwest client builders, for customizing the client’s behaviour.
Sourcepub fn new<T>(token: T) -> Self
pub fn new<T>(token: T) -> Self
Create a new Client struct. It takes a type that can convert into
an &str (String
or Vec<u8>
for example). As long as the function is
given a valid API key your requests will work.
Sourcepub fn set_base_url<H>(&mut self, base_url: H)
pub fn set_base_url<H>(&mut self, base_url: H)
Set the base URL for the client to something other than the default: https://api.rippling.com.
Sourcepub fn new_from_env() -> Self
pub fn new_from_env() -> Self
Create a new Client struct from the environment variable: RIPPLING_BASE_API_TOKEN
.
Sourcepub async fn request_raw(
&self,
method: Method,
uri: &str,
body: Option<Body>,
) -> Result<RequestBuilder>
pub async fn request_raw( &self, method: Method, uri: &str, body: Option<Body>, ) -> Result<RequestBuilder>
Create a raw request to our API.
Sourcepub fn companies(&self) -> Companies
pub fn companies(&self) -> Companies
Return a reference to an interface that provides access to Companies operations.
Sourcepub fn employees(&self) -> Employees
pub fn employees(&self) -> Employees
Return a reference to an interface that provides access to Employees operations.
Sourcepub fn groups(&self) -> Groups
pub fn groups(&self) -> Groups
Return a reference to an interface that provides access to Groups operations.
Sourcepub fn saml(&self) -> Saml
pub fn saml(&self) -> Saml
Return a reference to an interface that provides access to SAML operations.
Sourcepub fn current_user(&self) -> CurrentUser
pub fn current_user(&self) -> CurrentUser
Return a reference to an interface that provides access to Current User operations.
Sourcepub fn ats(&self) -> Ats
pub fn ats(&self) -> Ats
Return a reference to an interface that provides access to ATS operations.
Sourcepub fn application_management(&self) -> ApplicationManagement
pub fn application_management(&self) -> ApplicationManagement
Return a reference to an interface that provides access to Application Management operations.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more