A single answer to a survey question, submitted through SubmitSurveyAnswers. More...
#include <LootLockerSurveysRequestHandler.h>
Static Public Member Functions | |
| static FLootLockerSurveyAnswer | FromText (const FString &MetadataKey, const FString &Value) |
| Build a String answer, for short_text, long_text, date and select questions. | |
| static FLootLockerSurveyAnswer | FromNumber (const FString &MetadataKey, double Value) |
| Build a Number answer, for number questions. | |
| static FLootLockerSurveyAnswer | FromBool (const FString &MetadataKey, bool Value) |
| Build a Bool answer, for checkbox questions. | |
| static FLootLockerSurveyAnswer | FromMultiSelect (const FString &MetadataKey, const TArray< FString > &SelectedValues) |
| Build a Json answer, for multiselect questions. | |
Data Fields | |
| FString | Metadata_key = "" |
| The metadata_key of the question this answers. | |
| FString | Value = "" |
| The answer value. | |
| ELootLockerMetadataTypes | Type = ELootLockerMetadataTypes::String |
| The metadata type of the value. | |
A single answer to a survey question, submitted through SubmitSurveyAnswers.
The metadata API validates the declared type against the value, so a checkbox answer must be declared Bool, a number Number, and a multiselect Json — sending everything as String is rejected. Build these with MakeSurveyTextAnswer and friends rather than filling the fields by hand: they format Value to match Type.
|
static |
Build a Bool answer, for checkbox questions.
|
static |
Build a Json answer, for multiselect questions.
|
static |
Build a Number answer, for number questions.
|
static |
Build a String answer, for short_text, long_text, date and select questions.
| FString FLootLockerSurveyAnswer::Metadata_key = "" |
The metadata_key of the question this answers.
| ELootLockerMetadataTypes FLootLockerSurveyAnswer::Type = ELootLockerMetadataTypes::String |
The metadata type of the value.
Must match the question's field_type: short_text/long_text/date/select -> String, number -> Number, checkbox -> Bool, multiselect -> Json.
| FString FLootLockerSurveyAnswer::Value = "" |
The answer value.
For String answers this is the raw text, stored verbatim (no quoting needed). For Number, Bool and Json answers it is a JSON literal: 42, true, and ["a","b"].
Prefer MakeSurveyTextAnswer and friends, which format this for you.