Viz Social Deployment Guide
Version 1.0 | Published June 22, 2021 ©
Submission of Pre-Aggregated Poll Data
Submission via JSON Files
Viz Social is able to accept aggregated Poll standings generated by external sources. Out-of-the-box, this is supported via files formatted in Viz Social ’s native Poll JSON format.
Each snapshot of a pre-aggregated, externally-managed Poll must be formatted as follows.
Syntax by Example
Each snapshot of aggregated Poll standings must be formatted as a structure starting with metadata identifying the Poll and its status, followed by counts and other parameters for each Poll alternative. Please find an example of the natively supported structure below:
{
"id"
:
0
,
"question"
:
"Which is your favourite Pokémon?"
,
"image"
:
"https://code.never.no/test/img/profile-01.jpg"
,
"status"
:
"open"
,
"end_time"
:
1534864196093
,
"timestamp"
:
1534777796093
,
"options"
: [
{
"uuid"
:
"a"
,
"text"
:
"Pokémon #001: Bulbasaur "
,
"count"
:
94
,
"image"
:
"https://code.never.no/test/img/pokemon/001.png"
},
{
"uuid"
:
"b"
,
"text"
:
"Pokémon #002: Ivysaur "
,
"count"
:
2
,
"image"
:
"https://code.never.no/test/img/pokemon/002.png"
},
{
"uuid"
:
"c"
,
"text"
:
"Pokémon #003: Venusaur "
,
"count"
:
6
,
"image"
:
"https://code.never.no/test/img/pokemon/003.png"
}
]
}
Semantics
Poll Field Definitions
The table below contains the definitions of the Poll fields and parameters.
Field |
Description |
Required |
id |
An ID used to reference the Poll in question |
Yes |
question |
Question text. Is set to a default text in Viz Social if not included. |
No |
image |
URL to image associated with the question. |
No |
status |
open or closed. Currently ignored by Viz Social. |
No |
end_time |
Unix timestamp (in milliseconds) that the Poll ends. |
No |
timestamp |
Current time of the snapshot as a Unix timestamp (in milliseconds). |
No |
options |
Array of alternatives. |
Yes (at least one) |
uuid |
Unique ID to identify the alternative. |
Yes |
text |
Name of the alternative. Is set to the UUID by Viz Social if not provided. |
No |
count |
Aggregated number of cast votes for the alternative so far. |
Yes |
image |
URL to image associated with the alternative. |
No |
Business Logic
Please take note of the following items when designing the business logic for integrating with an external source of Posts:
-
The example in Syntax by Example shows the widest supported set of fields and parameters. Most fields are optional, see Poll Field Definitions.
-
Question and alternative texts are only set the first time Viz Social harvests the poll. Updates in later snapshots are ignored, but can be processed (overwritten) manually via the Viz Social UI.
-
The read interval to check for updates of the JSON file is configurable on Viz Social.
Dynamics
Files with aggregated Poll standings from external sources must be delivered at a well-defined path where it can be polled by Viz Social. Only one Poll per JSON file is supported.
File access, data transport and naming conventions are not prescribed. After having been agreed, they form input to Never.no’s integration services.
Submission in Other Formats
Aggregated Poll standings in alternative JSON formats or even via RSS/Atom feeds or plain XML, can often be supported via customized pre-processing on-board of Viz Social as well.
Important: Customization options should be discussed with Never.no. Please contact the Never.no support team to discuss options and to come to an optimal solution.