Struct rippling_api::Client
source · 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://rest.ripplingapis.com.
sourcepub fn new_from_env() -> Self
pub fn new_from_env() -> Self
Create a new Client struct from the environment variable: RIPPLING_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 custom_fields(&self) -> CustomFields
pub fn custom_fields(&self) -> CustomFields
Custom fields defined by the company.
sourcepub fn custom_object_fields(&self) -> CustomObjectFields
pub fn custom_object_fields(&self) -> CustomObjectFields
Custom object fields defined by the company.
sourcepub fn custom_object_records(&self) -> CustomObjectRecords
pub fn custom_object_records(&self) -> CustomObjectRecords
Custom object datarows defined by the company.
sourcepub fn custom_objects(&self) -> CustomObjects
pub fn custom_objects(&self) -> CustomObjects
Custom objects defined by the company.
sourcepub fn departments(&self) -> Departments
pub fn departments(&self) -> Departments
Departments used by the company.
sourcepub fn employment_types(&self) -> EmploymentTypes
pub fn employment_types(&self) -> EmploymentTypes
Employment types used by the company.
sourcepub fn entitlements(&self) -> Entitlements
pub fn entitlements(&self) -> Entitlements
Availability of API features to the company or Partners.
sourcepub fn object_categories(&self) -> ObjectCategories
pub fn object_categories(&self) -> ObjectCategories
Object Categories defined by the company.
sourcepub fn work_locations(&self) -> WorkLocations
pub fn work_locations(&self) -> WorkLocations
Work locations used by the company.
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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