pirogoeth on suppressions
Implement suppressions API (#25… (compare)
pirogoeth on pagination-typo
Fix typo in PaginationResponse:… (compare)
pirogoeth on analysis-8QP51Z
pirogoeth on suppressions
Apply fixes from StyleCI (#268) (compare)
pirogoeth on analysis-8QP51Z
Apply fixes from StyleCI (compare)
pirogoeth on suppressions
Implement suppressions API (#25… (compare)
$logs = $this->mailgun_obj->events()->get( CL_WP_MM_DOMAIN );
whats is the best approach for iterate with $logs results ?
<?php
$events = $this->mailgun_obj->events()->get( CL_WP_MM_DOMAIN );
$n_events = count( $events->getItems() );
foreach ( $events->getItems() as $item ) {
echo '<p>' . $item->getId() . '</p>';
echo '<p>' . $item->getTimestamp() . '</p>';
echo '<p>' . $item->getEvent() . '</p>';
echo '<p>' . $item->getRecipient() . '</p>';
}
Hi @Nyholm is there any method for to know total items (no response total item that I've with count) for make pagination?, I've methods:
<?php
$nextPage = $this->mailgun_obj->events()->nextPage( $res );
$previousPage = $this->mailgun_obj->events()->previousPage( $res );
$firstPage = $this->mailgun_obj->events()->firstPage( $res );
$lastPage = $this->mailgun_obj->events()->lastPage( $res );
but I never know if exists a previous or next page because I haven't total count.
"paging": {
"next":
"https://api.mailgun.net/v3/samples.mailgun.org/events/W3siY...",
"previous":
"https://api.mailgun.net/v3/samples.mailgun.org/events/Lkawm..."
}