mikmc commited on
Commit
4d53124
·
verified ·
1 Parent(s): 9967187

Update use-cases/index.js

Browse files
Files changed (1) hide show
  1. use-cases/index.js +22 -16
use-cases/index.js CHANGED
@@ -1,17 +1,23 @@
1
- const Catalog = require('./catalog')
2
- const Meta = require('./meta')
3
- const Stream = require('./stream')
 
4
 
5
- module.exports = (dependencies) => {
6
- return {
7
- ...Catalog({
8
- ...dependencies,
9
- }),
10
- ...Meta({
11
- ...dependencies,
12
- }),
13
- ...Stream({
14
- ...dependencies,
15
- }),
16
- }
17
- }
 
 
 
 
 
 
1
+ const axios = require('axios');
2
+ const Catalog = require('./catalog');
3
+ const Meta = require('./meta');
4
+ const Stream = require('./stream');
5
 
6
+ // Define shared dependencies
7
+ const dependencies = {
8
+ httpClient: axios,
9
+ env: {
10
+ url: {
11
+ search: 'https://archive.org/advancedsearch.php',
12
+ metadata: 'https://archive.org/metadata',
13
+ stream: 'https://archive.org/download',
14
+ },
15
+ },
16
+ };
17
+
18
+ // Export Stremio add-on functions
19
+ module.exports = {
20
+ ...Catalog(dependencies),
21
+ ...Meta(dependencies),
22
+ ...Stream(dependencies),
23
+ };