ParticipantService - getParticipantDetails() method - returns full data of participant with given e-mail of given survey

This commit is contained in:
Meritoo
2017-10-01 20:51:03 +02:00
parent f5334f816f
commit db6a6f22e2
2 changed files with 61 additions and 1 deletions

View File

@@ -179,7 +179,7 @@ class ParticipantService
}
/**
* Returns participant with given e-mail of given survey
* Returns short data of one participant with given e-mail of given survey
*
* @param int $surveyId ID of survey
* @param string $email E-mail address of the participant
@@ -197,6 +197,31 @@ class ParticipantService
->getParticipantOfSurvey($surveyId, $email);
}
/**
* Returns full data of participant with given e-mail of given survey
*
* @param int $surveyId ID of survey
* @param string $email E-mail address of the participant
* @return Participant|null
*/
public function getParticipantDetails($surveyId, $email)
{
$arguments = [
$surveyId,
[
'email' => $email,
],
];
$participant = $this
->client
->run(MethodType::GET_PARTICIPANT_PROPERTIES, $arguments)
->getData();
/* @var Participant $participant */
return $participant;
}
/**
* Returns information if participant with given e-mail has filled given survey
*