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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
// API is: '/best'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct Best {
  // (optional) the string <code>all</code>
  pub show: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // (optional) expand subreddits
  pub sr_detail: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // a positive integer (default: 0)
  pub count: String,
}

// API is: '/by_id/{{names}}'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct ByIdName {
  // A comma-separated list of link <a href="#fullnames">fullnames</a>
  pub names: String,
}

// API is: '/comments/{{article}}'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct CommentsArticle {
  // an integer between 0 and 8
  pub context: String,

  // (optional) ID36 of a comment
  pub comment: String,

  // boolean value
  pub threaded: String,

  // one of (<code>confidence</code>, <code>top</code>, <code>new</code>, <code>controversial</code>, <code>old</code>, <code>random</code>, <code>qa</code>, <code>live</code>)
  pub sort: String,

  // boolean value
  pub showmore: String,

  // ID36 of a link
  pub article: String,

  // (optional) an integer
  pub depth: String,

  // boolean value
  pub showedits: String,

  // (optional) expand subreddits
  pub sr_detail: String,

  // an integer between 0 and 50
  pub truncate: String,

  // (optional) an integer
  pub limit: String,
}

// API is: '/r/{{subreddit}}/comments/{{article}}'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct RSubredditCommentsArticle {
  // an integer between 0 and 8
  pub context: String,

  // (optional) ID36 of a comment
  pub comment: String,

  // boolean value
  pub threaded: String,

  // one of (<code>confidence</code>, <code>top</code>, <code>new</code>, <code>controversial</code>, <code>old</code>, <code>random</code>, <code>qa</code>, <code>live</code>)
  pub sort: String,

  // boolean value
  pub showmore: String,

  // ID36 of a link
  pub article: String,

  // (optional) an integer
  pub depth: String,

  // boolean value
  pub showedits: String,

  // (optional) expand subreddits
  pub sr_detail: String,

  // an integer between 0 and 50
  pub truncate: String,

  // (optional) an integer
  pub limit: String,
}

// API is: '/duplicates/{{article}}'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct DuplicatesArticle {
  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // (optional) expand subreddits
  pub sr_detail: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // (optional) the string <code>all</code>
  pub show: String,

  // one of (<code>num_comments</code>, <code>new</code>)
  pub sort: String,

  // subreddit name
  pub sr: String,

  // a positive integer (default: 0)
  pub count: String,

  // boolean value
  pub crossposts_only: String,

  // The base 36 ID of a Link
  pub article: String,
}

// API is: '/hot'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct Hot {
  // a positive integer (default: 0)
  pub count: String,

  // one of (<code>GLOBAL</code>, <code>US</code>, <code>AR</code>, <code>AU</code>, <code>BG</code>, <code>CA</code>, <code>CL</code>, <code>CO</code>, <code>HR</code>, <code>CZ</code>, <code>FI</code>, <code>GR</code>, <code>HU</code>, <code>IS</code>, <code>IN</code>, <code>IE</code>, <code>JP</code>, <code>MY</code>, <code>MX</code>, <code>NZ</code>, <code>PH</code>, <code>PL</code>, <code>PT</code>, <code>PR</code>, <code>RO</code>, <code>RS</code>, <code>SG</code>, <code>SE</code>, <code>TW</code>, <code>TH</code>, <code>TR</code>, <code>GB</code>, <code>US_WA</code>, <code>US_DE</code>, <code>US_DC</code>, <code>US_WI</code>, <code>US_WV</code>, <code>US_HI</code>, <code>US_FL</code>, <code>US_WY</code>, <code>US_NH</code>, <code>US_NJ</code>, <code>US_NM</code>, <code>US_TX</code>, <code>US_LA</code>, <code>US_NC</code>, <code>US_ND</code>, <code>US_NE</code>, <code>US_TN</code>, <code>US_NY</code>, <code>US_PA</code>, <code>US_CA</code>, <code>US_NV</code>, <code>US_VA</code>, <code>US_CO</code>, <code>US_AK</code>, <code>US_AL</code>, <code>US_AR</code>, <code>US_VT</code>, <code>US_IL</code>, <code>US_GA</code>, <code>US_IN</code>, <code>US_IA</code>, <code>US_OK</code>, <code>US_AZ</code>, <code>US_ID</code>, <code>US_CT</code>, <code>US_ME</code>, <code>US_MD</code>, <code>US_MA</code>, <code>US_OH</code>, <code>US_UT</code>, <code>US_MO</code>, <code>US_MN</code>, <code>US_MI</code>, <code>US_RI</code>, <code>US_KS</code>, <code>US_MT</code>, <code>US_MS</code>, <code>US_SC</code>, <code>US_KY</code>, <code>US_OR</code>, <code>US_SD</code>)
  pub g: String,

  // (optional) the string <code>all</code>
  pub show: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // (optional) expand subreddits
  pub sr_detail: String,
}

// API is: '/r/{{subreddit}}/hot'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct RSubredditHot {
  // a positive integer (default: 0)
  pub count: String,

  // one of (<code>GLOBAL</code>, <code>US</code>, <code>AR</code>, <code>AU</code>, <code>BG</code>, <code>CA</code>, <code>CL</code>, <code>CO</code>, <code>HR</code>, <code>CZ</code>, <code>FI</code>, <code>GR</code>, <code>HU</code>, <code>IS</code>, <code>IN</code>, <code>IE</code>, <code>JP</code>, <code>MY</code>, <code>MX</code>, <code>NZ</code>, <code>PH</code>, <code>PL</code>, <code>PT</code>, <code>PR</code>, <code>RO</code>, <code>RS</code>, <code>SG</code>, <code>SE</code>, <code>TW</code>, <code>TH</code>, <code>TR</code>, <code>GB</code>, <code>US_WA</code>, <code>US_DE</code>, <code>US_DC</code>, <code>US_WI</code>, <code>US_WV</code>, <code>US_HI</code>, <code>US_FL</code>, <code>US_WY</code>, <code>US_NH</code>, <code>US_NJ</code>, <code>US_NM</code>, <code>US_TX</code>, <code>US_LA</code>, <code>US_NC</code>, <code>US_ND</code>, <code>US_NE</code>, <code>US_TN</code>, <code>US_NY</code>, <code>US_PA</code>, <code>US_CA</code>, <code>US_NV</code>, <code>US_VA</code>, <code>US_CO</code>, <code>US_AK</code>, <code>US_AL</code>, <code>US_AR</code>, <code>US_VT</code>, <code>US_IL</code>, <code>US_GA</code>, <code>US_IN</code>, <code>US_IA</code>, <code>US_OK</code>, <code>US_AZ</code>, <code>US_ID</code>, <code>US_CT</code>, <code>US_ME</code>, <code>US_MD</code>, <code>US_MA</code>, <code>US_OH</code>, <code>US_UT</code>, <code>US_MO</code>, <code>US_MN</code>, <code>US_MI</code>, <code>US_RI</code>, <code>US_KS</code>, <code>US_MT</code>, <code>US_MS</code>, <code>US_SC</code>, <code>US_KY</code>, <code>US_OR</code>, <code>US_SD</code>)
  pub g: String,

  // (optional) the string <code>all</code>
  pub show: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // (optional) expand subreddits
  pub sr_detail: String,
}

// API is: '/new'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct New {
  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // (optional) the string <code>all</code>
  pub show: String,

  // a positive integer (default: 0)
  pub count: String,

  // (optional) expand subreddits
  pub sr_detail: String,
}

// API is: '/r/{{subreddit}}/new'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct RSubredditNew {
  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // (optional) the string <code>all</code>
  pub show: String,

  // a positive integer (default: 0)
  pub count: String,

  // (optional) expand subreddits
  pub sr_detail: String,
}

// API is: '/rising'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct Rising {
  // (optional) expand subreddits
  pub sr_detail: String,

  // a positive integer (default: 0)
  pub count: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // (optional) the string <code>all</code>
  pub show: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,
}

// API is: '/r/{{subreddit}}/rising'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct RSubredditRising {
  // (optional) expand subreddits
  pub sr_detail: String,

  // a positive integer (default: 0)
  pub count: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // (optional) the string <code>all</code>
  pub show: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,
}

// API is: '/top'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct Top {
  // (optional) expand subreddits
  pub sr_detail: String,

  // one of (<code>hour</code>, <code>day</code>, <code>week</code>, <code>month</code>, <code>year</code>, <code>all</code>)
  pub t: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // a positive integer (default: 0)
  pub count: String,

  // (optional) the string <code>all</code>
  pub show: String,
}

// API is: '/r/{{subreddit}}/top'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct RSubredditTop {
  // (optional) expand subreddits
  pub sr_detail: String,

  // one of (<code>hour</code>, <code>day</code>, <code>week</code>, <code>month</code>, <code>year</code>, <code>all</code>)
  pub t: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // a positive integer (default: 0)
  pub count: String,

  // (optional) the string <code>all</code>
  pub show: String,
}

// API is: '/controversial'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct Controversial {
  // (optional) expand subreddits
  pub sr_detail: String,

  // one of (<code>hour</code>, <code>day</code>, <code>week</code>, <code>month</code>, <code>year</code>, <code>all</code>)
  pub t: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // a positive integer (default: 0)
  pub count: String,

  // (optional) the string <code>all</code>
  pub show: String,
}

// API is: '/r/{{subreddit}}/controversial'
#[derive(Default, Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
pub struct RSubredditControversial {
  // (optional) expand subreddits
  pub sr_detail: String,

  // one of (<code>hour</code>, <code>day</code>, <code>week</code>, <code>month</code>, <code>year</code>, <code>all</code>)
  pub t: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub before: String,

  // <a href="#fullnames">fullname</a> of a thing
  pub after: String,

  // the maximum number of items desired (default: 25, maximum: 100)
  pub limit: String,

  // a positive integer (default: 0)
  pub count: String,

  // (optional) the string <code>all</code>
  pub show: String,
}