Created
April 9, 2015 20:59
-
-
Save tonyalaribe/998740db390d64a27d4c to your computer and use it in GitHub Desktop.
JSON API sstructures and examples for pollo.io
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "poll id <unique>", | |
"pheader": "Heade or description text", | |
"qs": [ | |
{ | |
"qid": "question id <uniqe>", | |
"qtext": "question text", | |
"qtype": "question types:MC|YS|IN(m choice|yes or no|inpuy)", | |
"as": [ | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
}, | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
} | |
] | |
}, | |
{ | |
"qid": "question id <uniqe>", | |
"qtext": "question text", | |
"qtype": "question types:MC|YS|IN(m choice|yes or no|inpuy)", | |
"as": [ | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
}, | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
} | |
] | |
} | |
], | |
"pnotes": "any footer for poll" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "poll id <unique>", | |
"pheader": "Heade or description text", | |
"qs": [ | |
{ | |
"qid": "question id <uniqe>", | |
"qtext": "question text", | |
"qtype": "question types:MC|YS|IN(m choice|yes or no|inpuy)", | |
"as": [ | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
}, | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
} | |
] | |
}, | |
{ | |
"qid": "question id <uniqe>", | |
"qtext": "question text", | |
"qtype": "question types:MC|YS|IN(m choice|yes or no|inpuy)", | |
"as": [ | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
}, | |
{ | |
"aid": "answer id <unique>", | |
"atype": "type of answer: PT|TI|OI(plain text|text with image|only image)", | |
"answer": [ | |
"answer text", | |
"image url" | |
] | |
} | |
] | |
} | |
], | |
"pnotes": "any footer for poll" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"key": "client key <unique> assigned at the time of registration", | |
"pid": "poll id sent by server", | |
"as": [ | |
{ | |
"qid": "question id sent by server", | |
"aid": "answer id sent by server in case of m choice" | |
}, | |
{ | |
"qid": "question id sent by server", | |
"aval": "input value of the user in case of input type question" | |
}, | |
{ | |
"qid": "question id sent by server", | |
"ays": true | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"id": "http://jsonschema.net", | |
"type": "object", | |
"properties": { | |
"key": { | |
"id": "http://jsonschema.net/key", | |
"type": "string" | |
}, | |
"pid": { | |
"id": "http://jsonschema.net/pid", | |
"type": "string" | |
}, | |
"as": { | |
"id": "http://jsonschema.net/as", | |
"type": "array", | |
"items": [ | |
{ | |
"id": "http://jsonschema.net/as/0", | |
"type": "object", | |
"properties": { | |
"qid": { | |
"id": "http://jsonschema.net/as/0/qid", | |
"type": "string" | |
}, | |
"aid": { | |
"id": "http://jsonschema.net/as/0/aid", | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"id": "http://jsonschema.net/as/1", | |
"type": "object", | |
"properties": { | |
"qid": { | |
"id": "http://jsonschema.net/as/1/qid", | |
"type": "string" | |
}, | |
"aval": { | |
"id": "http://jsonschema.net/as/1/aval", | |
"type": "string" | |
} | |
} | |
}, | |
{ | |
"id": "http://jsonschema.net/as/2", | |
"type": "object", | |
"properties": { | |
"qid": { | |
"id": "http://jsonschema.net/as/2/qid", | |
"type": "string" | |
}, | |
"ays": { | |
"id": "http://jsonschema.net/as/2/ays", | |
"type": "boolean" | |
} | |
} | |
} | |
] | |
} | |
}, | |
"required": [ | |
"key", | |
"pid", | |
"as" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment