Struct Stats

Source
pub struct Stats {
    pub client: Client,
}

Fields§

§client: Client

Implementations§

Source§

impl Stats

Source

pub async fn get_page( &self, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetStatsResponseData>>, ClientError>

Retrieve global email statistics.

This function performs a GET to the /stats endpoint.

This endpoint allows you to retrieve all of your global email statistics between a given date range.

Parent accounts will see aggregated stats for their account and all subuser accounts. Subuser accounts will only see their own stats.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
  • offset: i64 – The point in the list to begin retrieving results.
  • offset: i64 – The point in the list to begin retrieving results.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
  • start_date: &str – The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
Source

pub async fn get_all( &self, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetStatsResponseData>>, ClientError>

Retrieve global email statistics.

This function performs a GET to the /stats endpoint.

As opposed to get, this function returns all the pages of the request at once.

This endpoint allows you to retrieve all of your global email statistics between a given date range.

Parent accounts will see aggregated stats for their account and all subuser accounts. Subuser accounts will only see their own stats.

Source

pub async fn get_geo( &self, country: Country, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetGeoStatsResponseData>>, ClientError>

Retrieve email statistics by country and state/province.

This function performs a GET to the /geo/stats endpoint.

This endpoint allows you to retrieve your email statistics segmented by country and state/province.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our User Guide.

Parameters:

  • country: crate::types::Country – The country you would like to see statistics for. Currently only supported for US and CA.
  • on_behalf_of: &str – The license key provided with your New Relic account.
  • offset: i64 – The point in the list to begin retrieving results.
  • offset: i64 – The point in the list to begin retrieving results.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
  • start_date: &str – The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
Source

pub async fn get_all_geo( &self, country: Country, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetGeoStatsResponseData>>, ClientError>

Retrieve email statistics by country and state/province.

This function performs a GET to the /geo/stats endpoint.

As opposed to get_geo, this function returns all the pages of the request at once.

This endpoint allows you to retrieve your email statistics segmented by country and state/province.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our User Guide.

Source

pub async fn get_devices( &self, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetClientsStatsResponse>>, ClientError>

Retrieve email statistics by device type.

This function performs a GET to the /devices/stats endpoint.

This endpoint allows you to retrieve your email statistics segmented by the device type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

§Available Device Types
DeviceDescriptionExample
DesktopEmail software on desktop computer.I.E., Outlook, Sparrow, or Apple Mail.
WebmailA web-based email client.I.E., Yahoo, Google, AOL, or Outlook.com.
PhoneA smart phone.iPhone, Android, Blackberry, etc.
TabletA tablet computer.iPad, android based tablet, etc.
OtherAn unrecognized device.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
  • offset: i64 – The point in the list to begin retrieving results.
  • offset: i64 – The point in the list to begin retrieving results.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
  • start_date: &str – The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
Source

pub async fn get_all_devices( &self, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetClientsStatsResponse>>, ClientError>

Retrieve email statistics by device type.

This function performs a GET to the /devices/stats endpoint.

As opposed to get_devices, this function returns all the pages of the request at once.

This endpoint allows you to retrieve your email statistics segmented by the device type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

§Available Device Types
DeviceDescriptionExample
DesktopEmail software on desktop computer.I.E., Outlook, Sparrow, or Apple Mail.
WebmailA web-based email client.I.E., Yahoo, Google, AOL, or Outlook.com.
PhoneA smart phone.iPhone, Android, Blackberry, etc.
TabletA tablet computer.iPad, android based tablet, etc.
OtherAn unrecognized device.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Source

pub async fn get_clients( &self, start_date: &str, end_date: &str, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, ) -> Result<Response<Vec<GetClientsStatsResponse>>, ClientError>

Retrieve email statistics by client type.

This function performs a GET to the /clients/stats endpoint.

This endpoint allows you to retrieve your email statistics segmented by client type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
  • start_date: &str – The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
Source

pub async fn get_all_clients( &self, start_date: &str, end_date: &str, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, ) -> Result<Response<Vec<GetClientsStatsResponse>>, ClientError>

Retrieve email statistics by client type.

This function performs a GET to the /clients/stats endpoint.

As opposed to get_clients, this function returns all the pages of the request at once.

This endpoint allows you to retrieve your email statistics segmented by client type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Source

pub async fn get_clients_client_type( &self, client_type: ClientType, start_date: &str, end_date: &str, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, ) -> Result<Response<Vec<GetClientsStatsResponse>>, ClientError>

Retrieve stats by a specific client type.

This function performs a GET to the /clients/{client_type}/stats endpoint.

This endpoint allows you to retrieve your email statistics segmented by a specific client type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

§Available Client Types
  • phone
  • tablet
  • webmail
  • desktop

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Parameters:

  • on_behalf_of: &str – The license key provided with your New Relic account.
  • start_date: &str – The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
Source

pub async fn get_all_clients_client_type( &self, client_type: ClientType, start_date: &str, end_date: &str, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, ) -> Result<Response<Vec<GetClientsStatsResponse>>, ClientError>

Retrieve stats by a specific client type.

This function performs a GET to the /clients/{client_type}/stats endpoint.

As opposed to get_clients_client_type, this function returns all the pages of the request at once.

This endpoint allows you to retrieve your email statistics segmented by a specific client type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

§Available Client Types
  • phone
  • tablet
  • webmail
  • desktop

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Source

pub async fn get_mailbox_providers( &self, mailbox_providers: &str, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetMailboxProvidersStatsResponseData>>, ClientError>

Retrieve email statistics by mailbox provider.

This function performs a GET to the /mailbox_providers/stats endpoint.

This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Parameters:

  • mailbox_providers: &str – The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times.
  • on_behalf_of: &str – The license key provided with your New Relic account.
  • offset: i64 – The point in the list to begin retrieving results.
  • offset: i64 – The point in the list to begin retrieving results.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
  • start_date: &str – The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
Source

pub async fn get_all_mailbox_providers( &self, mailbox_providers: &str, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetMailboxProvidersStatsResponseData>>, ClientError>

Retrieve email statistics by mailbox provider.

This function performs a GET to the /mailbox_providers/stats endpoint.

As opposed to get_mailbox_providers, this function returns all the pages of the request at once.

This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Source

pub async fn get_browsers( &self, browsers: &str, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetBrowsersStatsResponseData>>, ClientError>

Retrieve email statistics by browser.

This function performs a GET to the /browsers/stats endpoint.

This endpoint allows you to retrieve your email statistics segmented by browser type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Parameters:

  • browsers: &str – The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times.
  • on_behalf_of: &str – The license key provided with your New Relic account.
  • offset: i64 – The point in the list to begin retrieving results.
  • offset: i64 – The point in the list to begin retrieving results.
  • aggregated_by: crate::types::TraitStatsAdvancedBaseQueryStringsAggregatedBy – How to group the statistics. Must be either “day”, “week”, or “month”.
  • start_date: &str – The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.
  • end_date: &str – The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.
Source

pub async fn get_all_browsers( &self, browsers: &str, offset: i64, aggregated_by: TraitStatsAdvancedBaseQueryStringsAggregatedBy, start_date: &str, end_date: &str, ) -> Result<Response<Vec<GetBrowsersStatsResponseData>>, ClientError>

Retrieve email statistics by browser.

This function performs a GET to the /browsers/stats endpoint.

As opposed to get_browsers, this function returns all the pages of the request at once.

This endpoint allows you to retrieve your email statistics segmented by browser type.

We only store up to 7 days of email activity in our database. By default, 500 items will be returned per request via the Advanced Stats API endpoints.

Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our Statistics Overview.

Auto Trait Implementations§

§

impl Freeze for Stats

§

impl !RefUnwindSafe for Stats

§

impl Send for Stats

§

impl Sync for Stats

§

impl Unpin for Stats

§

impl !UnwindSafe for Stats

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,