-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathActorInfoService.pas
More file actions
404 lines (357 loc) · 14.2 KB
/
ActorInfoService.pas
File metadata and controls
404 lines (357 loc) · 14.2 KB
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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
unit ActorInfoService;
interface
uses
XData.Service.Common,
XData.Security.Attributes,
Aurelius.Mapping.Attributes,
System.Classes;
type
[ServiceContract]
[Model('Actorious')]
IActorInfoService = interface(IInvokable)
['{D0697F1E-EE4C-47D1-A29E-0B19B5D396FD}']
/// <summary>
/// Progress
/// </summary>
/// <remarks>
/// Returns the current processing status of a request.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="Progress">
/// Key.
/// </param>
[HttpGet] function Progress(Secret: String; Progress: String):String;
/// <summary>
/// BirthDay
/// </summary>
/// <remarks>
/// Returns a JSON object containing all of the birthdays for people that
/// are listed in the Wikidata database with a TMDb ID. This is cached on disk.
/// If the cache is not available, a small delay will be incurred while the data
/// is retrieved from Wikidata in real-time.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Birth Month (1-12).
/// </param>
/// <param name="aDay">
/// Birth Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function BirthDay(Secret: String; aMonth: Integer; aDay: Integer; Progress: String):TStream;
/// <summary>
/// DeathDay
/// </summary>
/// <remarks>
/// Returns a JSON object containing all of the deathdays for people that
/// are listed in the Wikidata database. This is cached on disk. If the
/// cache is not available, a small delay will be incurred while the data
/// is retrieved from Wikidata in real-time.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Death Month (1-12).
/// </param>
/// <param name="aDay">
/// Death Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function DeathDay(Secret: String; aMonth: Integer; aDay: Integer; Progress: String):TStream;
/// <summary>
/// ReleaseDay
/// </summary>
/// <remarks>
/// Returns a JSON object containing all of the release days for mvoies that
/// are listed in the Wikidata database. This is cached on disk. If the
/// cache is not available, a small delay will be incurred while the data
/// is retrieved from Wikidata in real-time.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Release Month (1-12).
/// </param>
/// <param name="aDay">
/// Release Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function ReleaseDay(Secret: String; aMonth: Integer; aDay: Integer; Progress: String):TStream;
/// <summary>
/// ActorBirthday
/// </summary>
/// <remarks>
/// Returns a list of Actors with a birthday that falls on the supplied month and day.
/// NOTE: This data is cached. If you reqest a birthday that has not currently cached,
/// there will be a substantial delay in processsing this request. Please pass in a
/// Progress parameter (something like a GUID) and then check on the progress of the
/// request by passing the same parameter to the Progress endpoint.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Birth Month (1-12).
/// </param>
/// <param name="aDay">
/// Birth Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function ActorBirthDay(Secret: String; aMonth: Integer; aDay: Integer; Progress: String):TStream;
/// <summary>
/// ActorBirthday50
/// </summary>
/// <remarks>
/// Returns a list of Actors with a birthday that falls on the supplied month and day.
/// NOTE: This data is cached. If you reqest a birthday that has not currently cached,
/// there will be a substantial delay in processsing this request. Please pass in a
/// Progress parameter (something like a GUID) and then check on the progress of the
/// request by passing the same parameter to the Progress endpoint.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Birth Month (1-12).
/// </param>
/// <param name="aDay">
/// Birth Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function ActorBirthDay50(Secret: String; aMonth: Integer; aDay: Integer; Progress: String):TStream;
/// <summary>
/// ActorDeathDay
/// </summary>
/// <remarks>
/// Returns a list of Actors that passed away on the specified month and day.
/// NOTE: This data is cached. If you reqest a birthday that has not currently cached,
/// there will be a substantial delay in processsing this request. Please pass in a
/// Progress parameter (something like a GUID) and then check on the progress of the
/// request by passing the same parameter to the Progress endpoint.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Death Month (1-12).
/// </param>
/// <param name="aDay">
/// Death Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function ActorDeathDay(Secret: String; aMonth: Integer; ADay: Integer; Progress: String):TStream;
/// <summary>
/// ActorDeathDay50
/// </summary>
/// <remarks>
/// Returns a list of the top 50 Actors that passed away on the specified month and day.
/// NOTE: This data is cached. If you reqest a birthday that has not currently cached,
/// there will be a substantial delay in processsing this request. Please pass in a
/// Progress parameter (something like a GUID) and then check on the progress of the
/// request by passing the same parameter to the Progress endpoint.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Death Month (1-12).
/// </param>
/// <param name="aDay">
/// Death Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function ActorDeathDay50(Secret: String; aMonth: Integer; ADay: Integer; Progress: String):TStream;
/// <summary>
/// MovieReleaseDay
/// </summary>
/// <remarks>
/// Returns a list of the Movies released on the specified month and day.
/// NOTE: This data is cached. If you reqest a day that has not currently cached,
/// there will be a substantial delay in processsing this request. Please pass in a
/// Progress parameter (something like a GUID) and then check on the progress of the
/// request by passing the same parameter to the Progress endpoint.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Release Month (1-12).
/// </param>
/// <param name="aDay">
/// Release Day (1-31).
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function MovieReleaseDay(Secret: String; aMonth: Integer; ADay: Integer; Progress: String):TStream;
/// <summary>
/// TopOneThousand
/// </summary>
/// <remarks>
/// Returns a list of Actors that are rated as in the Top 1000 according
/// to TMDb, using the same format as the other actor-related endpoints.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function TopOneThousand(Secret: String; Progress: String):TStream;
/// <summary>
/// TopFiveThousand
/// </summary>
/// <remarks>
/// Returns a list of Actors that are rated as in the Top 5000 according
/// to TMDb, using the same format as the other actor-related endpoints.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function TopFiveThousand(Secret: String; Progress: String):TStream;
/// <summary>
/// TopToday
/// </summary>
/// <remarks>
/// Returns a list of Actors that are the top-rated for a given day
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="aMonth">
/// Release Month (1-12).
/// </param>
/// <param name="aDay">
/// Release Day (1-31).
/// </param>
[HttpGet] function TopToday(Secret: String; aMonth: Integer; aDay: Integer):TStream;
/// <summary>
/// SearchPeople
/// </summary>
/// <remarks>
/// Returns a list of Actors that match whatever search term is passed. the
/// search results include only those poeple that have been cached already,
/// which is limited to anyone in the Top5000 list or that has a defined
/// birthday in Wikidata, or that has been cached due to an extended search.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="SearchTerm">
/// Term to search for in People. Must be at least three characters.
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function SearchPeople(Secret: String; SearchTerm: String; Progress: String):TStream;
/// <summary>
/// SearchLocal
/// </summary>
/// <remarks>
/// Returns a list of Actors that match whatever search term is passed. the
/// search results include only those poeple that have been cached already,
/// which is limited to anyone in the Top5000 list or that has a defined
/// birthday in Wikidata, or that has been cached due to an extended search.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="SearchTerm">
/// Term to search for in People. Must be at least three characters.
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function SearchLocal(Secret: String; SearchTerm: String; Progress: String):TStream;
/// <summary>
/// SearchPeopleExtended
/// </summary>
/// <remarks>
/// Returns a list of Actors that match whatever search term is passed.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="SearchTerm">
/// Term to search for in People. Must be at least three characters.
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function SearchPeopleExtended(Secret: String; SearchTerm: String; Progress: String):TStream;
/// <summary>
/// Relatives
/// </summary>
/// <remarks>
/// Returns a list of Actors that are related to the indicated person.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="RelatedTo">
/// Searches for people related to this person, a WikiData ID.
/// </param>
/// <param name="RelatedName">
/// The regular name of the person - saves us from having to look it up somewhere, but just used
/// to add more context the logging, not for anything critical to the process
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function Relatives(Secret: String; RelatedTo: Integer; RelatedName: String; Progress: String):TStream;
/// <summary>
/// GetClientVersion
/// </summary>
/// <remarks>
/// Returns a JSON object showing the current version number and also the image
/// to load initially for the main display (the first person on the current date).
/// </remarks>
/// <param name="Day">
/// The current day (local to the user) that we're looking up (MMDD)
/// </param>
[HttpGet] function GetClientVersion(Day:String):TStream;
/// <summary>
/// Lookup
/// </summary>
/// <remarks>
/// Returns whatever lookup request is received. Might be a one or more
/// actors, movies or tv shows, specified in the request.
/// </remarks>
/// <param name="Secret">
/// If I told you, it wouldn't be a secret.
/// </param>
/// <param name="Lookup">
/// JSON Lookup request.
/// </param>
/// <param name="Progress">
/// Key to lookup progress with the Progress endpoint.
/// </param>
[HttpGet] function Lookup(Secret: String; Lookup:String; Progress: String):TStream;
end;
implementation
initialization
RegisterServiceType(TypeInfo(IActorInfoService));
end.