Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing the Person::all() to list persons #18

Open
rayrutjes opened this issue Mar 5, 2019 · 4 comments
Open

Missing the Person::all() to list persons #18

rayrutjes opened this issue Mar 5, 2019 · 4 comments

Comments

@rayrutjes
Copy link

The PHP API client is missing the \Delighted\Person::all(); method.

Also, it would be nice to be able to expand the properties value.
Current this value is not returned as part of the GET /people endpoint, which makes it hard to partially update some properties from different non connected systems.

@mkdynamic
Copy link
Contributor

The PHP API client is missing the \Delighted\Person::all(); method.

@rayrutjes Thanks for this suggestion, we definitely need to add this method.

Also, it would be nice to be able to expand the properties value.
Currently this value is not returned as part of the GET /people endpoint, which makes it hard to partially update some properties from different non connected systems.

The properties are associated with a specific survey (vs. the person) and so we only return properties as part of survey payloads (vs. person payloads). You should be able to get properties using \Delighted\SurveyResponse::all(['person_id' => '123']) and \Delighted\SurveyResponse::retrieve(). Hopefully that helps.

@rayrutjes
Copy link
Author

rayrutjes commented Mar 6, 2019

Thanks for your answer @mkdynamic

The properties are associated with a specific survey (vs. the person) and so we only return properties as part of survey payloads (vs. person payloads)

Indeed, I understand this now. This was non trivial to understand from documentation.

You should be able to get properties using \Delighted\SurveyResponse::all(['person_id' => '123']) and \Delighted\SurveyResponse::retrieve()

Unfortunately these requests only return responses, but there is no way to retrieve scheduled SurveyRequest's.

@mkdynamic
Copy link
Contributor

Gotcha, makes sense. Yes, unfortunately we don't have any endpoints for listing SurveyRequests currently, but it's something we do plan to add. No timeline on that yet though.

@anil3a
Copy link

anil3a commented May 31, 2019

I have create a new pull request #19 .
This will add Person:all() feature, however keep in mind that this will return all active people from Delighted.

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

No branches or pull requests

3 participants