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

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 ==. Read more

This method tests for !=.

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

Compare self to key and return true if they are equal.

Performs the conversion.

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

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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