@segha/watchmode 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/IdMapping.ts +15 -0
  2. package/README.md +178 -0
  3. package/index.ts +4 -0
  4. package/json-schemas/API/APIEndpoints.json +23 -0
  5. package/json-schemas/API/BaseUrl.json +6 -0
  6. package/json-schemas/API/ConfigurationSchema.json +13 -0
  7. package/json-schemas/API/DatasetsBaseUrl.json +6 -0
  8. package/json-schemas/API/DatasetsEndpoints.json +10 -0
  9. package/json-schemas/API/EndpointsSchema.json +50 -0
  10. package/json-schemas/API/IDMappingDatasetEndpoint.json +6 -0
  11. package/json-schemas/API/ListSourcesEndpoint.json +6 -0
  12. package/json-schemas/API/MethodsSchema.json +528 -0
  13. package/json-schemas/API/SourcesEndpoints.json +10 -0
  14. package/json-schemas/API/SpecSchema.json +554 -0
  15. package/json-schemas/API/TitleSourcesEndpoint.json +6 -0
  16. package/json-schemas/API/TitlesEndpoints.json +10 -0
  17. package/json-schemas/API/Version.json +6 -0
  18. package/json-schemas/API/index.json +1241 -0
  19. package/json-schemas/FreeServiceType.json +6 -0
  20. package/json-schemas/IdMappingEntrySchema.json +38 -0
  21. package/json-schemas/IdMappingSchema.json +41 -0
  22. package/json-schemas/PurchaseServiceType.json +6 -0
  23. package/json-schemas/Sources/FreeServiceType.json +6 -0
  24. package/json-schemas/Sources/PurchaseServiceType.json +6 -0
  25. package/json-schemas/Sources/StreamingSourceSchema.json +129 -0
  26. package/json-schemas/Sources/StreamingSourceTypeSchema.json +26 -0
  27. package/json-schemas/Sources/StreamingSourcesParametersSchema.json +18 -0
  28. package/json-schemas/Sources/StreamingSourcesSchema.json +132 -0
  29. package/json-schemas/Sources/SubscriptionServiceType.json +6 -0
  30. package/json-schemas/Sources/TVEServiceType.json +6 -0
  31. package/json-schemas/Sources/index.json +336 -0
  32. package/json-schemas/StreamingSourceSchema.json +129 -0
  33. package/json-schemas/StreamingSourceTypeSchema.json +26 -0
  34. package/json-schemas/StreamingSourcesParametersSchema.json +18 -0
  35. package/json-schemas/StreamingSourcesSchema.json +132 -0
  36. package/json-schemas/SubscriptionServiceType.json +6 -0
  37. package/json-schemas/TVEServiceType.json +6 -0
  38. package/json-schemas/TitleStreamingSourceSchema.json +169 -0
  39. package/json-schemas/TitleStreamingSourcesParametersSchema.json +13 -0
  40. package/json-schemas/TitleStreamingSourcesSchema.json +172 -0
  41. package/json-schemas/Titles/TitleStreamingSourceSchema.json +169 -0
  42. package/json-schemas/Titles/TitleStreamingSourcesParametersSchema.json +13 -0
  43. package/json-schemas/Titles/TitleStreamingSourcesSchema.json +172 -0
  44. package/json-schemas/Titles/index.json +361 -0
  45. package/json-schemas/index.json +769 -0
  46. package/package.json +51 -0
@@ -0,0 +1,554 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "version": {
6
+ "type": "string",
7
+ "const": "1",
8
+ "description": "API version"
9
+ },
10
+ "baseUrl": {
11
+ "type": "string",
12
+ "const": "https://api.watchmode.com/v1",
13
+ "description": "Base URL for the API"
14
+ },
15
+ "datasetsBaseUrl": {
16
+ "type": "string",
17
+ "const": "https://api.watchmode.com/datasets",
18
+ "description": "Base URL for datasets"
19
+ },
20
+ "methods": {
21
+ "type": "object",
22
+ "properties": {
23
+ "datasets": {
24
+ "type": "object",
25
+ "properties": {
26
+ "id_mapping": {
27
+ "type": "object",
28
+ "properties": {
29
+ "get": {
30
+ "type": "object",
31
+ "properties": {
32
+ "endpoint": {
33
+ "type": "string",
34
+ "const": "/title_id_map.csv",
35
+ "description": "ID mapping dataset"
36
+ },
37
+ "responses": {
38
+ "type": "object",
39
+ "properties": {
40
+ "200": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "object",
44
+ "properties": {
45
+ "Watchmode ID": {
46
+ "type": "string",
47
+ "description": "Watchmode ID"
48
+ },
49
+ "IMDB ID": {
50
+ "type": "string",
51
+ "description": "IMDB ID"
52
+ },
53
+ "TMDB ID": {
54
+ "type": "string",
55
+ "description": "TMDB ID"
56
+ },
57
+ "TMDB Type": {
58
+ "type": "string",
59
+ "description": "TMDB Type"
60
+ },
61
+ "Title": {
62
+ "type": "string",
63
+ "description": "Title"
64
+ },
65
+ "Year": {
66
+ "type": "string",
67
+ "description": "Year"
68
+ }
69
+ },
70
+ "required": [
71
+ "Watchmode ID",
72
+ "IMDB ID",
73
+ "TMDB ID",
74
+ "TMDB Type",
75
+ "Title",
76
+ "Year"
77
+ ]
78
+ },
79
+ "description": "ID mapping dataset (CSV content)"
80
+ }
81
+ },
82
+ "required": [
83
+ "200"
84
+ ]
85
+ }
86
+ },
87
+ "required": [
88
+ "endpoint",
89
+ "responses"
90
+ ]
91
+ }
92
+ },
93
+ "required": [
94
+ "get"
95
+ ]
96
+ }
97
+ },
98
+ "required": [
99
+ "id_mapping"
100
+ ]
101
+ },
102
+ "sources": {
103
+ "type": "object",
104
+ "properties": {
105
+ "list": {
106
+ "type": "object",
107
+ "properties": {
108
+ "get": {
109
+ "type": "object",
110
+ "properties": {
111
+ "endpoint": {
112
+ "type": "string",
113
+ "const": "/sources",
114
+ "description": "List all sources"
115
+ },
116
+ "parameters": {
117
+ "type": "object",
118
+ "properties": {
119
+ "query": {
120
+ "type": "object",
121
+ "properties": {
122
+ "regions": {
123
+ "type": "string",
124
+ "description": "Filter sources by region. Pass one or multiple 2-letter country codes comma-separated (e.g., US,GB,CA)."
125
+ },
126
+ "types": {
127
+ "type": "string",
128
+ "description": "Filter sources by type. Pass one or multiple types comma-separated."
129
+ }
130
+ },
131
+ "required": [
132
+ "regions",
133
+ "types"
134
+ ]
135
+ }
136
+ },
137
+ "required": [
138
+ "query"
139
+ ]
140
+ },
141
+ "responses": {
142
+ "type": "object",
143
+ "properties": {
144
+ "200": {
145
+ "type": "array",
146
+ "items": {
147
+ "type": "object",
148
+ "properties": {
149
+ "id": {
150
+ "type": "number",
151
+ "description": "ID"
152
+ },
153
+ "name": {
154
+ "type": "string",
155
+ "description": "Name"
156
+ },
157
+ "type": {
158
+ "anyOf": [
159
+ {
160
+ "type": "string",
161
+ "const": "sub",
162
+ "description": "Subscription services (Netflix, Hulu, etc.)"
163
+ },
164
+ {
165
+ "type": "string",
166
+ "const": "purchase",
167
+ "description": "Rental/purchase services (iTunes, Vudu, etc.)"
168
+ },
169
+ {
170
+ "type": "string",
171
+ "const": "free",
172
+ "description": "Free ad-supported services (Tubi, Pluto TV, etc.)"
173
+ },
174
+ {
175
+ "type": "string",
176
+ "const": "tve",
177
+ "description": "TV Channel App (cable login required)"
178
+ }
179
+ ],
180
+ "description": "Streaming source type"
181
+ },
182
+ "logo_100px": {
183
+ "type": "string",
184
+ "description": "Logo 100px"
185
+ },
186
+ "ios_appstore_url": {
187
+ "anyOf": [
188
+ {
189
+ "type": "string"
190
+ },
191
+ {
192
+ "type": "null"
193
+ }
194
+ ],
195
+ "description": "iOS App Store URL"
196
+ },
197
+ "android_playstore_url": {
198
+ "anyOf": [
199
+ {
200
+ "type": "string"
201
+ },
202
+ {
203
+ "type": "null"
204
+ }
205
+ ],
206
+ "description": "Android Play Store URL"
207
+ },
208
+ "android_tv_url": {
209
+ "anyOf": [
210
+ {
211
+ "type": "string"
212
+ },
213
+ {
214
+ "type": "null"
215
+ }
216
+ ],
217
+ "description": "Android TV URL"
218
+ },
219
+ "fire_tv_url": {
220
+ "anyOf": [
221
+ {
222
+ "type": "string"
223
+ },
224
+ {
225
+ "type": "null"
226
+ }
227
+ ],
228
+ "description": "Fire TV URL"
229
+ },
230
+ "roku_url": {
231
+ "anyOf": [
232
+ {
233
+ "type": "string"
234
+ },
235
+ {
236
+ "type": "null"
237
+ }
238
+ ],
239
+ "description": "Roku URL"
240
+ },
241
+ "tvos_url": {
242
+ "anyOf": [
243
+ {
244
+ "type": "string"
245
+ },
246
+ {
247
+ "type": "null"
248
+ }
249
+ ],
250
+ "description": "tvOS URL"
251
+ },
252
+ "regions": {
253
+ "type": "array",
254
+ "items": {
255
+ "type": "string"
256
+ },
257
+ "description": "Regions"
258
+ }
259
+ },
260
+ "required": [
261
+ "id",
262
+ "name",
263
+ "type",
264
+ "logo_100px",
265
+ "ios_appstore_url",
266
+ "android_playstore_url",
267
+ "android_tv_url",
268
+ "fire_tv_url",
269
+ "roku_url",
270
+ "tvos_url",
271
+ "regions"
272
+ ]
273
+ }
274
+ }
275
+ },
276
+ "required": [
277
+ "200"
278
+ ]
279
+ }
280
+ },
281
+ "required": [
282
+ "endpoint",
283
+ "parameters",
284
+ "responses"
285
+ ]
286
+ }
287
+ },
288
+ "required": [
289
+ "get"
290
+ ]
291
+ }
292
+ },
293
+ "required": [
294
+ "list"
295
+ ]
296
+ },
297
+ "titles": {
298
+ "type": "object",
299
+ "properties": {
300
+ "sources": {
301
+ "type": "object",
302
+ "properties": {
303
+ "get": {
304
+ "type": "object",
305
+ "properties": {
306
+ "endpoint": {
307
+ "type": "string",
308
+ "const": "/title/{title_id}/sources",
309
+ "description": "Title sources"
310
+ },
311
+ "parameters": {
312
+ "type": "object",
313
+ "properties": {
314
+ "url": {
315
+ "type": "object",
316
+ "properties": {
317
+ "title_id": {
318
+ "type": "number",
319
+ "description": "Title ID"
320
+ }
321
+ },
322
+ "required": [
323
+ "title_id"
324
+ ]
325
+ },
326
+ "query": {
327
+ "type": "object",
328
+ "properties": {
329
+ "regions": {
330
+ "type": "string",
331
+ "description": "Filter sources by region. Pass one or multiple 2-letter country codes comma-separated (e.g., US,GB,CA)."
332
+ }
333
+ },
334
+ "required": [
335
+ "regions"
336
+ ]
337
+ }
338
+ },
339
+ "required": [
340
+ "url",
341
+ "query"
342
+ ]
343
+ },
344
+ "responses": {
345
+ "type": "object",
346
+ "properties": {
347
+ "200": {
348
+ "type": "array",
349
+ "items": {
350
+ "type": "object",
351
+ "properties": {
352
+ "source_id": {
353
+ "type": "number",
354
+ "description": "Source ID"
355
+ },
356
+ "name": {
357
+ "type": "string",
358
+ "description": "Name"
359
+ },
360
+ "type": {
361
+ "anyOf": [
362
+ {
363
+ "type": "string",
364
+ "const": "sub",
365
+ "description": "Subscription services (Netflix, Hulu, etc.)"
366
+ },
367
+ {
368
+ "type": "string",
369
+ "const": "purchase",
370
+ "description": "Rental/purchase services (iTunes, Vudu, etc.)"
371
+ },
372
+ {
373
+ "type": "string",
374
+ "const": "free",
375
+ "description": "Free ad-supported services (Tubi, Pluto TV, etc.)"
376
+ },
377
+ {
378
+ "type": "string",
379
+ "const": "tve",
380
+ "description": "TV Channel App (cable login required)"
381
+ }
382
+ ],
383
+ "description": "Streaming source type"
384
+ },
385
+ "region": {
386
+ "type": "string",
387
+ "description": "Region"
388
+ },
389
+ "ios_url": {
390
+ "anyOf": [
391
+ {
392
+ "type": "string"
393
+ },
394
+ {
395
+ "type": "null"
396
+ }
397
+ ],
398
+ "description": "iOS deep link URL. For free plans, returns \"Deeplinks available for paid plans only.\""
399
+ },
400
+ "android_url": {
401
+ "anyOf": [
402
+ {
403
+ "type": "string"
404
+ },
405
+ {
406
+ "type": "null"
407
+ }
408
+ ],
409
+ "description": "Android deep link URL. For free plans, returns \"Deeplinks available for paid plans only.\""
410
+ },
411
+ "web_url": {
412
+ "anyOf": [
413
+ {
414
+ "type": "string"
415
+ },
416
+ {
417
+ "type": "null"
418
+ }
419
+ ],
420
+ "description": "Web URL to watch the title"
421
+ },
422
+ "tvos_url": {
423
+ "anyOf": [
424
+ {
425
+ "type": "string"
426
+ },
427
+ {
428
+ "type": "null"
429
+ }
430
+ ],
431
+ "description": "tvOS deep link. Only included if TV links are enabled for your account."
432
+ },
433
+ "android_tv_url": {
434
+ "anyOf": [
435
+ {
436
+ "type": "string"
437
+ },
438
+ {
439
+ "type": "null"
440
+ }
441
+ ],
442
+ "description": "Android TV deep link. Only included if TV links are enabled for your account."
443
+ },
444
+ "roku_url": {
445
+ "anyOf": [
446
+ {
447
+ "type": "string"
448
+ },
449
+ {
450
+ "type": "null"
451
+ }
452
+ ],
453
+ "description": "Roku deep link. Only included if TV links are enabled for your account."
454
+ },
455
+ "format": {
456
+ "anyOf": [
457
+ {
458
+ "type": "string"
459
+ },
460
+ {
461
+ "type": "null"
462
+ }
463
+ ],
464
+ "description": "Video quality (HD, 4K, etc.)"
465
+ },
466
+ "price": {
467
+ "anyOf": [
468
+ {
469
+ "type": "number"
470
+ },
471
+ {
472
+ "type": "null"
473
+ }
474
+ ],
475
+ "description": "Price for rent/buy sources"
476
+ },
477
+ "seasons": {
478
+ "anyOf": [
479
+ {
480
+ "type": "number"
481
+ },
482
+ {
483
+ "type": "null"
484
+ }
485
+ ],
486
+ "description": "Number of seasons available (for TV)"
487
+ },
488
+ "episodes": {
489
+ "anyOf": [
490
+ {
491
+ "type": "number"
492
+ },
493
+ {
494
+ "type": "null"
495
+ }
496
+ ],
497
+ "description": "Number of episodes available (for TV)"
498
+ }
499
+ },
500
+ "required": [
501
+ "source_id",
502
+ "name",
503
+ "type",
504
+ "region",
505
+ "ios_url",
506
+ "android_url",
507
+ "web_url",
508
+ "tvos_url",
509
+ "android_tv_url",
510
+ "roku_url",
511
+ "format",
512
+ "price",
513
+ "seasons",
514
+ "episodes"
515
+ ]
516
+ }
517
+ }
518
+ },
519
+ "required": [
520
+ "200"
521
+ ]
522
+ }
523
+ },
524
+ "required": [
525
+ "endpoint",
526
+ "parameters",
527
+ "responses"
528
+ ]
529
+ }
530
+ },
531
+ "required": [
532
+ "get"
533
+ ]
534
+ }
535
+ },
536
+ "required": [
537
+ "sources"
538
+ ]
539
+ }
540
+ },
541
+ "required": [
542
+ "datasets",
543
+ "sources",
544
+ "titles"
545
+ ]
546
+ }
547
+ },
548
+ "required": [
549
+ "version",
550
+ "baseUrl",
551
+ "datasetsBaseUrl",
552
+ "methods"
553
+ ]
554
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "string",
4
+ "const": "/title/{title_id}/sources",
5
+ "description": "Title sources"
6
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "anyOf": [
4
+ {
5
+ "type": "string",
6
+ "const": "/title/{title_id}/sources",
7
+ "description": "Title sources"
8
+ }
9
+ ]
10
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "string",
4
+ "const": "1",
5
+ "description": "API version"
6
+ }