InvergeDocs
PythonAPI reference

Surveys

In-product surveys — fetch what a user is eligible for, submit answers.

// access
client.surveys

In-product surveys — fetch what a user is eligible for, submit answers.

Surveys

class

client.surveys — headless: you render, Nexus targets and stores.

Extends Resource.

View source

active()

method
def active(*, distinct_id=None, device_key=None, properties=None, device_type=None, os_type=None) -> List[Any]

Surveys this user may see (targeting, sampling and capping applied).

Parameters

Prop

Type

Returns List[Any]

View source

respond()

method
def respond(survey_id, answers=None, *, completed=None, dismissed=None, response_id=None, iteration_key=None, distinct_id=None, session_key=None, device_key=None, os_type=None, os_version=None, browser=None, app_version=None, country=None, url=None) -> Dict[str, Any]

Submit a response (partial or complete); answers keyed by question id.

Returns {id, completed}. Pass the returned id back as response_id to keep appending to the same response.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

complete()

method
def complete(survey_id, answers, **options) -> Dict[str, Any]

Submit a completed response in one call.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

dismiss()

method
def dismiss(survey_id, **options) -> Dict[str, Any]

Record that the user dismissed the survey.

Parameters

Prop

Type

Returns Dict[str, Any]

View source

On this page