-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpenTriviaSharp.xml
333 lines (333 loc) · 13.2 KB
/
OpenTriviaSharp.xml
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
<?xml version="1.0"?>
<doc>
<assembly>
<name>OpenTriviaSharp</name>
</assembly>
<members>
<member name="T:OpenTriviaSharp.Exceptions.OpenTriviaException">
<summary>
Open Trivia exception.
</summary>
</member>
<member name="T:OpenTriviaSharp.Models.Category">
<summary>
Represent category question from https://opentdb.com/api_category.php.
</summary>
</member>
<member name="T:OpenTriviaSharp.Models.Difficulty">
<summary>
Question difficulty.
</summary>
</member>
<member name="T:OpenTriviaSharp.Models.ResponseEncoding">
<summary>
Response encoding of JSON response.
</summary>
</member>
<member name="F:OpenTriviaSharp.Models.ResponseEncoding.Default">
<summary>
All values will be encoded in HTML encoding.
</summary>
</member>
<member name="F:OpenTriviaSharp.Models.ResponseEncoding.Base64">
<summary>
All values will be enoded in Base64.
</summary>
</member>
<member name="F:OpenTriviaSharp.Models.ResponseEncoding.Url3986">
<summary>
All values will be encoded in URL encoding (RFC 3986).
</summary>
</member>
<member name="T:OpenTriviaSharp.Models.TriviaQuestion">
<summary>
Trivia question.
</summary>
</member>
<member name="M:OpenTriviaSharp.Models.TriviaQuestion.#ctor(OpenTriviaSharp.Models.Category,OpenTriviaSharp.Models.TriviaType,OpenTriviaSharp.Models.Difficulty,System.String,System.String,System.String[])">
<summary>
Create a <see cref="T:OpenTriviaSharp.Models.TriviaQuestion"/>.
</summary>
<param name="category">
Question category.
</param>
<param name="type">
Question type.
</param>
<param name="difficulty">
Question difficulty.
</param>
<param name="question">
Question.
</param>
<param name="correctAnswer">
Question correct answer.
</param>
<param name="incorrectAnswers">
Question incorrect answers.
</param>
</member>
<member name="P:OpenTriviaSharp.Models.TriviaQuestion.Category">
<summary>
Get the question <see cref="P:OpenTriviaSharp.Models.TriviaQuestion.Category"/>.
</summary>
</member>
<member name="P:OpenTriviaSharp.Models.TriviaQuestion.Type">
<summary>
Get the question <see cref="T:OpenTriviaSharp.Models.TriviaType"/>.
</summary>
</member>
<member name="P:OpenTriviaSharp.Models.TriviaQuestion.Difficulty">
<summary>
Get the question <see cref="T:OpenTriviaSharp.Models.Difficulty"/>.
</summary>
</member>
<member name="P:OpenTriviaSharp.Models.TriviaQuestion.Question">
<summary>
Get the question.
</summary>
</member>
<member name="P:OpenTriviaSharp.Models.TriviaQuestion.CorrectAnswer">
<summary>
Get the question correct answer.
</summary>
</member>
<member name="P:OpenTriviaSharp.Models.TriviaQuestion.IncorrectAnswers">
<summary>
Get the question incorrect answers.
</summary>
</member>
<member name="T:OpenTriviaSharp.Models.TriviaType">
<summary>
Question type.
</summary>
</member>
<member name="F:OpenTriviaSharp.Models.TriviaType.Multiple">
<summary>
Multiple choice.
</summary>
</member>
<member name="F:OpenTriviaSharp.Models.TriviaType.Boolean">
<summary>
True or False.
</summary>
</member>
<member name="T:OpenTriviaSharp.OpenTriviaClient">
<summary>
Open Trivia Database client.
</summary>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.#ctor(System.Net.Http.HttpClient,System.String)">
<summary>
Create <see cref="T:OpenTriviaSharp.OpenTriviaClient"/> instance.
</summary>
<param name="client">
<see cref="T:System.Net.Http.HttpClient"/> object to send and receiving response.
</param>
<param name="sessionToken">
Session token of Open Trivia for tracking requested question.
</param>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.Finalize">
<summary>
Release all resource that this object handle.
</summary>
</member>
<member name="P:OpenTriviaSharp.OpenTriviaClient.Token">
<summary>
Get current session token.
</summary>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.GetJsonResponseAsync``1(System.String)">
<summary>
Get JSON response from url.
</summary>
<typeparam name="T">
The type of the object to deserialize.
</typeparam>
<param name="url">
API URL.
</param>
<returns>
The instance of <typeparamref name="T"/> being deserialized.
</returns>
<exception cref="T:OpenTriviaSharp.Exceptions.OpenTriviaException">
Unexpected error occured.
</exception>
<exception cref="T:System.Net.Http.HttpRequestException">
The request failed due to an underlying issue such as network connectivity, DNS
failure, server certificate validation or timeout.
</exception>
<exception cref="T:System.Text.Json.JsonException">
The JSON is invalid.
</exception>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.ReadTriviaQuestion(System.Text.Json.JsonElement)">
<summary>
Read JSON data with encoding <see cref="F:OpenTriviaSharp.Models.ResponseEncoding.Default"/>.
</summary>
<param name="item"></param>
<returns>
A <see cref="T:OpenTriviaSharp.Models.TriviaQuestion"/>.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.ReadTriviaQuestionURL(System.Text.Json.JsonElement)">
<summary>
Read JSON data with encoding <see cref="F:OpenTriviaSharp.Models.ResponseEncoding.Url3986"/>.
</summary>
<param name="item"></param>
<returns>
A <see cref="T:OpenTriviaSharp.Models.TriviaQuestion"/>.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.ReadTriviaQuestionBase64(System.Text.Json.JsonElement)">
<summary>
Read JSON data with encoding <see cref="F:OpenTriviaSharp.Models.ResponseEncoding.Base64"/>.
</summary>
<param name="item"></param>
<returns>
A <see cref="T:OpenTriviaSharp.Models.TriviaQuestion"/>.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.AddUserAgent">
<summary>
Add browser user agent to <see cref="T:System.Net.Http.HttpClient"/>.
</summary>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.FromBase64(System.String)">
<summary>
Convert base64 string to UTF-8 string.
</summary>
<param name="base64String">
Base64 string to convert.
</param>
<returns>
UTF-8 string.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.DetermineCategory(System.String)">
<summary>
Convert JSON reponse category property to <see cref="T:OpenTriviaSharp.Models.Category"/>.
</summary>
<param name="category">
Category string from JSON response.
</param>
<returns>
<see cref="T:OpenTriviaSharp.Models.Category"/> based on paramater <paramref name="category"/>.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.DetermineDifficulty(System.String)">
<summary>
Convert JSON reponse difficulty property to <see cref="T:OpenTriviaSharp.Models.Difficulty"/>.
</summary>
<param name="difficulty">
Difficulty string from JSON response.
</param>
<returns>
<see cref="T:OpenTriviaSharp.Models.Difficulty"/> based on parameter <paramref name="difficulty"/>.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.DetermineType(System.String)">
<summary>
Convert JSON reponse type property to <see cref="T:OpenTriviaSharp.Models.TriviaType"/>.
</summary>
<param name="type">
Type string from JSON response.
</param>
<returns>
<see cref="T:OpenTriviaSharp.Models.TriviaType"/> based on parameter <paramref name="type"/>.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.ResponseError(System.Byte)">
<summary>
Get response message based on response code.
</summary>
<param name="responseCode">
Response code in the JSON response.
</param>
<returns>
Message based on response code.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.GetQuestionAsync(System.Byte,OpenTriviaSharp.Models.Category,OpenTriviaSharp.Models.TriviaType,OpenTriviaSharp.Models.Difficulty,OpenTriviaSharp.Models.ResponseEncoding,System.String)">
<summary>
Retrieves random <see cref="T:OpenTriviaSharp.Models.TriviaQuestion"/>.
</summary>
<param name="amount">
Amount of questions to be retrieved.
</param>
<param name="category">
Category of the questions to be retrieved.
</param>
<param name="type">
Type of the questions to be retrieved.
</param>
<param name="difficulty">
Difficulty of the questions to be retrieved.
</param>
<param name="encoding">
Encoding of the API response to be used.
</param>
<param name="sessionToken">
Session token to be used.
</param>
<returns>
Array of <see cref="T:OpenTriviaSharp.Models.TriviaQuestion"/> based on specified parameters.
</returns>
<exception cref="T:OpenTriviaSharp.Exceptions.OpenTriviaException">
Unexpected error occured.
</exception>
<exception cref="T:System.Net.Http.HttpRequestException">
The request failed due to an underlying issue such as network connectivity, DNS
failure, server certificate validation or timeout.
</exception>
<exception cref="T:System.Text.Json.JsonException">
The JSON is invalid.
</exception>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.RequestTokenAsync">
<summary>
Retrieves a new session token.
</summary>
<returns>
New session token.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.ResetTokenAsync(System.String)">
<summary>
Resets a session token.
</summary>
<param name="sessionToken">
Session token to be reset.
</param>
<returns>
<see langword="true"/> if session token reseted; <see langword="false"/> otherwise.
</returns>
<exception cref="T:System.Text.Json.JsonException">
The JSON is invalid.
</exception>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.CountQuestionAsync(OpenTriviaSharp.Models.Category,OpenTriviaSharp.Models.Difficulty)">
<summary>
Retrieves number of question based on <see cref="T:OpenTriviaSharp.Models.Category"/>.
</summary>
<param name="category">
Category of question.
</param>
<param name="difficulty">
Difficulty of question.
</param>
<returns>
Number of question.
</returns>
</member>
<member name="M:OpenTriviaSharp.OpenTriviaClient.CategoryListAsync">
<summary>
Get category list.
</summary>
<returns>
Array of tuple (id, name) of category.
</returns>
</member>
</members>
</doc>