Skip to content

Adding support to wrapper for the Journeys API#97

Merged
taledo merged 6 commits into
masterfrom
Journey-API
Sep 4, 2019
Merged

Adding support to wrapper for the Journeys API#97
taledo merged 6 commits into
masterfrom
Journey-API

Conversation

@taledo

@taledo taledo commented Sep 3, 2019

Copy link
Copy Markdown
Contributor

No description provided.

@cmtiml cmtiml requested review from cmtiml and niawahyuni September 3, 2019 04:07

@niawahyuni niawahyuni left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @taledo - looking good, just a comment on the order_field below if it can be removed

Comment thread csrest_journey_emails.php Outdated
* }
*/

function get_journey_recipients($since = '', $page_number = NULL, $page_size = NULL, $order_field = NULL,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it posisble to remove $order_field reference from all the journey_emails endpoint (and the comment above the method)? these endspoints did not have order_field parameter (only order_direction)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niawahyuni No problem, this is done!

@cmtiml cmtiml left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, some minor suggestions : )

Comment thread csrest_clients.php Outdated
* @return CS_REST_Wrapper_Result A successful response will be an object of the form
* array(
* {
* 'ListID' => The id of the list

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor mis-Align here

Comment thread csrest_journey_emails.php Outdated
* 'Results' => array(
* {
* 'EmailAddress' =>
* 'Date' =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we referring to the API document for the return results?
It looks like there is slight difference between the API doc and the result shown here:
https://www.campaignmonitor.com/api/journeys/#journey-email-opens

Comment thread csrest_journey_emails.php Outdated
* {
'EmailAddress' =>
'Date' =>
'URL' =>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread csrest_journeys.php Outdated
* 'EmailID' => String
* 'Name' => String
* 'Bounced' => Int
* 'Clicked' => Int

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is meant to be Clicked - in the processing of updating the API docs

'refresh_token' => 'your refresh token');
$wrap = new CS_REST_JourneyEmails('Email ID to get bounces for', $auth);
$result = $wrap->get_journey_bounces('Get bounces since', 1, 50, 'email', 'asc');
//$result = $wrap->get_journey_bounces(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for putting a sample code, can we put it above the code to indicate the calling format?

'refresh_token' => 'your refresh token');
$wrap = new CS_REST_JourneyEmails('Email ID to get recipients for', $auth);
$result = $wrap->get_journey_recipients('Get recipients since', 1, 50, 'email', 'asc');
//$result = $wrap->get_journey_recipients(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, can we move it above the code?

'refresh_token' => 'your refresh token');
$wrap = new CS_REST_JourneyEmails('Email ID to get unsubscribes for', $auth);
$result = $wrap->get_journey_unsubscribes('Get unsubscribes since', 1, 50, 'email', 'asc');
//$result = $wrap->get_journey_unsubscribes(date('Y-m-d', strtotime('-30 days')), page, page size, order field, order direction);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, can we move it above the code?


$this->assertIdentical($expected_result, $result);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the extra lines here?

Comment thread tests/csrest_journeys_test.php Outdated
$this->general_test('get_journey_summary', $call_options, $raw_result, $deserialised);

}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the extra lines here?

Comment thread tests/csrest_test.php Outdated
$this->wrapper = new CS_REST_General($this->auth, $this->protocol, $this->log_level,
$this->api_host, $this->mock_log, $this->mock_serialiser,
$this->mock_transport);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the extra lines here?

@taledo

taledo commented Sep 3, 2019

Copy link
Copy Markdown
Contributor Author

Pull request comments have been actioned @cmtiml @niawahyuni

@niawahyuni niawahyuni left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @taledo - just one minor changes below before merging/releasing them

Comment thread csrest_journeys.php Outdated
* 'EmailID' => The ID of the email attached to the journey
* 'Name' => The name of the email attached to the journey
* 'Bounced' => The number of recipients who bounced
* 'Clicks' => The total number of recorded clicks

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taledo this one is meant to be Clicked - the API docs was just updated couple of minutes ago.. sorry for the confustion

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also now done. I will merge! Thank you

@cmtiml cmtiml left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, just need to action on the review comments from Nia, LGTM

@taledo taledo merged commit 46d85e4 into master Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants