Struct espocrm_rs::EspoApiClient
source · [−]pub struct EspoApiClient { /* private fields */ }
Implementations
Create an instance of EspoApiClient.
Set the URL where EspoCRM is located.
Set the username to use for authentication.
If you use this you must also call Self::set_password()
It is not recommended that you use this. Instead you should use API Key authorization or HMAC
Set the password to use for authentication
If you use this you must also call Self::set_username()
It is not recommended that you use this. Instead you should use API Key authorization or HMAC authorization
Set the API Key to use for authorization
If you only provide the API key, and not the secret_key, API Key authorization will be used.
If you wish to use HMAC authorization, you must also call Self::set_secret_key()
Set the Secret Key to use for HMAC authorization
If you use this you must also call Self::set_api_key()
Make a request to EspoCRM For more information, see the EspoCRM API Documentation
If you are making a GET request, you will still need to provide a type declaration for T. You can use the type NoGeneric for this.
- method: The HTTP method to be used. E.g GET or POST
- action: On what EspoCRM Object should the action be performed on. E.g “Contact” or “Contact/ID”. Essentially this is everything after “/api/v1/” in the URL.
- data_get: The filter to use on a GET request. Will be serialized according to PHP’s http_build_query function.
- data_post: The data to send on everything that is not a GET request. It will be serialized to JSON and send as the request body.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for EspoApiClient
impl Send for EspoApiClient
impl Sync for EspoApiClient
impl Unpin for EspoApiClient
impl UnwindSafe for EspoApiClient
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more