forked from instructure/pandarus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpoll_choices.json
254 lines (254 loc) · 7.41 KB
/
poll_choices.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
{
"apiVersion": "1.0",
"swaggerVersion": "1.2",
"basePath": "https://canvas.instructure.com/api",
"resourcePath": "/poll_choices",
"produces": [
"application/json"
],
"apis": [
{
"path": "/v1/polls/{poll_id}/poll_choices",
"description": "Returns the paginated list of PollChoices in this poll.",
"operations": [
{
"method": "GET",
"summary": "List poll choices in a poll",
"notes": "Returns the paginated list of PollChoices in this poll.",
"nickname": "list_poll_choices_in_poll",
"parameters": [
{
"paramType": "path",
"name": "poll_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "void"
}
]
},
{
"path": "/v1/polls/{poll_id}/poll_choices/{id}",
"description": "Returns the poll choice with the given id",
"operations": [
{
"method": "GET",
"summary": "Get a single poll choice",
"notes": "Returns the poll choice with the given id",
"nickname": "get_single_poll_choice",
"parameters": [
{
"paramType": "path",
"name": "poll_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "void"
}
]
},
{
"path": "/v1/polls/{poll_id}/poll_choices",
"description": "Create a new poll choice for this poll",
"operations": [
{
"method": "POST",
"summary": "Create a single poll choice",
"notes": "Create a new poll choice for this poll",
"nickname": "create_single_poll_choice",
"parameters": [
{
"paramType": "path",
"name": "poll_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "poll_choices[text]",
"description": "The descriptive text of the poll choice.",
"type": "array",
"format": null,
"required": true,
"items": {
"type": "string"
}
},
{
"paramType": "form",
"name": "poll_choices[is_correct]",
"description": "Whether this poll choice is considered correct or not. Defaults to false.",
"type": "array",
"format": null,
"required": false,
"items": {
"type": "boolean"
}
},
{
"paramType": "form",
"name": "poll_choices[position]",
"description": "The order this poll choice should be returned in the context it's sibling poll choices.",
"type": "array",
"format": "int64",
"required": false,
"items": {
"type": "integer"
}
}
],
"type": "void"
}
]
},
{
"path": "/v1/polls/{poll_id}/poll_choices/{id}",
"description": "Update an existing poll choice for this poll",
"operations": [
{
"method": "PUT",
"summary": "Update a single poll choice",
"notes": "Update an existing poll choice for this poll",
"nickname": "update_single_poll_choice",
"parameters": [
{
"paramType": "path",
"name": "poll_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "form",
"name": "poll_choices[text]",
"description": "The descriptive text of the poll choice.",
"type": "array",
"format": null,
"required": true,
"items": {
"type": "string"
}
},
{
"paramType": "form",
"name": "poll_choices[is_correct]",
"description": "Whether this poll choice is considered correct or not. Defaults to false.",
"type": "array",
"format": null,
"required": false,
"items": {
"type": "boolean"
}
},
{
"paramType": "form",
"name": "poll_choices[position]",
"description": "The order this poll choice should be returned in the context it's sibling poll choices.",
"type": "array",
"format": "int64",
"required": false,
"items": {
"type": "integer"
}
}
],
"type": "void"
}
]
},
{
"path": "/v1/polls/{poll_id}/poll_choices/{id}",
"description": "<b>204 No Content</b> response code is returned if the deletion was successful.",
"operations": [
{
"method": "DELETE",
"summary": "Delete a poll choice",
"notes": "<b>204 No Content</b> response code is returned if the deletion was successful.",
"nickname": "delete_poll_choice",
"parameters": [
{
"paramType": "path",
"name": "poll_id",
"description": "ID",
"type": "string",
"format": null,
"required": true
},
{
"paramType": "path",
"name": "id",
"description": "ID",
"type": "string",
"format": null,
"required": true
}
],
"type": "void"
}
]
}
],
"models": {
"PollChoice": {
"id": "PollChoice",
"description": "",
"required": [
"id",
"poll_id",
"text"
],
"properties": {
"id": {
"description": "The unique identifier for the poll choice.",
"example": 1023,
"type": "integer"
},
"poll_id": {
"description": "The id of the poll this poll choice belongs to.",
"example": 1779,
"type": "integer"
},
"is_correct": {
"description": "Specifies whether or not this poll choice is a 'correct' choice.",
"example": "true",
"type": "boolean"
},
"text": {
"description": "The text of the poll choice.",
"type": "string",
"example": "Choice A"
},
"position": {
"description": "The order of the poll choice in relation to it's sibling poll choices.",
"type": "integer",
"example": 1
}
}
}
}
}