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 POST request to EspoCRM to create an entity. This request will skip duplicate checks, which would otherwhise result in a HTTP 409.

For information about what the data and action should be, refer to the EspoCRM API Documentation.

Errors

If the request fails

Make a POST request to EspoCRM to create an entity. This request will perform duplicate checks and return a HTTP 409 if one is found. If you want to avoid this use Self::create_allow_duplicates.

For information about what the data and action should be, refer to the EspoCRM API Documentation.

Errors

If the request fails

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
Should always be Self
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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