xvideosx 1.6.3 → 1.6.4
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.
- package/AUTHORS +2 -2
- package/README.md +3 -2
- package/index.js +1 -1
- package/lib/api/base.js +14 -14
- package/lib/api/index.js +5 -5
- package/lib/api/videos/best/best.js +19 -19
- package/lib/api/videos/best/best.spec.js +138 -138
- package/lib/api/videos/best/createHasNextFunction.js +10 -10
- package/lib/api/videos/best/createHasPreviousFunction.js +10 -10
- package/lib/api/videos/best/createNextFunction.js +12 -12
- package/lib/api/videos/best/createPreviousFunction.js +12 -12
- package/lib/api/videos/best/createRefreshFunction.js +11 -11
- package/lib/api/videos/best/index.js +1 -1
- package/lib/api/videos/best/parseResponse.js +45 -45
- package/lib/api/videos/best/parseVideo.js +27 -27
- package/lib/api/videos/dashboard/createHasNextFunction.js +10 -10
- package/lib/api/videos/dashboard/createHasPreviousFunction.js +10 -10
- package/lib/api/videos/dashboard/createNextFunction.js +12 -12
- package/lib/api/videos/dashboard/createPreviousFunction.js +12 -12
- package/lib/api/videos/dashboard/createRefreshFunction.js +11 -11
- package/lib/api/videos/dashboard/dashboard.js +14 -14
- package/lib/api/videos/dashboard/dashboard.spec.js +138 -138
- package/lib/api/videos/dashboard/index.js +1 -1
- package/lib/api/videos/dashboard/parseResponse.js +45 -45
- package/lib/api/videos/dashboard/parseVideo.js +27 -27
- package/lib/api/videos/details/details.js +14 -14
- package/lib/api/videos/details/details.spec.js +49 -49
- package/lib/api/videos/details/index.js +1 -1
- package/lib/api/videos/details/parseCategory.js +9 -9
- package/lib/api/videos/details/parseModels.js +21 -21
- package/lib/api/videos/details/parseRelated.js +24 -24
- package/lib/api/videos/details/parseResponse.js +43 -43
- package/lib/api/videos/details/parseVideo.js +30 -30
- package/lib/api/videos/fresh/createHasNextFunction.js +10 -10
- package/lib/api/videos/fresh/createHasPreviousFunction.js +10 -10
- package/lib/api/videos/fresh/createNextFunction.js +12 -12
- package/lib/api/videos/fresh/createPreviousFunction.js +12 -12
- package/lib/api/videos/fresh/createRefreshFunction.js +11 -11
- package/lib/api/videos/fresh/fresh.js +14 -14
- package/lib/api/videos/fresh/fresh.spec.js +138 -138
- package/lib/api/videos/fresh/index.js +1 -1
- package/lib/api/videos/fresh/parseResponse.js +45 -45
- package/lib/api/videos/fresh/parseVideo.js +27 -27
- package/lib/api/videos/index.js +9 -9
- package/lib/api/videos/newfresh/createHasNextFunction.js +10 -10
- package/lib/api/videos/newfresh/createHasPreviousFunction.js +10 -10
- package/lib/api/videos/newfresh/createNextFunction.js +12 -12
- package/lib/api/videos/newfresh/createPreviousFunction.js +12 -12
- package/lib/api/videos/newfresh/createRefreshFunction.js +11 -11
- package/lib/api/videos/newfresh/newfresh.js +20 -20
- package/lib/api/videos/newfresh/parseResponse.js +47 -47
- package/lib/api/videos/newfresh/parseVideo.js +45 -45
- package/lib/api/videos/search/createHasNextFunction.js +10 -10
- package/lib/api/videos/search/createHasPreviousFunction.js +10 -10
- package/lib/api/videos/search/createNextFunction.js +12 -12
- package/lib/api/videos/search/createPreviousFunction.js +12 -12
- package/lib/api/videos/search/createRefreshFunction.js +11 -11
- package/lib/api/videos/search/index.js +1 -1
- package/lib/api/videos/search/parseResponse.js +45 -45
- package/lib/api/videos/search/parseVideo.js +27 -27
- package/lib/api/videos/search/search.js +23 -23
- package/lib/api/videos/search/search.spec.js +138 -138
- package/lib/api/videos/verified/createHasNextFunction.js +10 -10
- package/lib/api/videos/verified/createHasPreviousFunction.js +10 -10
- package/lib/api/videos/verified/createNextFunction.js +12 -12
- package/lib/api/videos/verified/createPreviousFunction.js +12 -12
- package/lib/api/videos/verified/createRefreshFunction.js +11 -11
- package/lib/api/videos/verified/index.js +1 -1
- package/lib/api/videos/verified/parseResponse.js +45 -45
- package/lib/api/videos/verified/parseVideo.js +27 -27
- package/lib/api/videos/verified/verified.js +14 -14
- package/lib/api/videos/verified/verified.spec.js +138 -138
- package/lib/index.js +1 -1
- package/lib/xvideos.js +1 -1
- package/lib/xvideos.spec.js +19 -19
- package/package.json +1 -1
@@ -1,138 +1,138 @@
|
|
1
|
-
/* eslint-disable padded-blocks */
|
2
|
-
|
3
|
-
const chai = require('chai');
|
4
|
-
const verified = require('./verified');
|
5
|
-
|
6
|
-
before(() => {
|
7
|
-
chai.should();
|
8
|
-
});
|
9
|
-
|
10
|
-
describe('api/videos/verified', () => {
|
11
|
-
|
12
|
-
it('should list verified video pages', async () => {
|
13
|
-
const list = await verified({ page: 2 });
|
14
|
-
|
15
|
-
list.should.be.an('object');
|
16
|
-
list.pagination.should.be.an('object');
|
17
|
-
list.pagination.page.should.be.equals(2);
|
18
|
-
list.pagination.pages.should.be.an('array');
|
19
|
-
list.pagination.pages[0].should.be.a('number');
|
20
|
-
list.hasNext.should.be.a('function');
|
21
|
-
list.hasNext().should.be.equals(true);
|
22
|
-
list.hasPrevious.should.be.a('function');
|
23
|
-
list.hasPrevious().should.be.equals(true);
|
24
|
-
list.next.should.be.a('function');
|
25
|
-
list.previous.should.be.a('function');
|
26
|
-
list.videos.should.be.an('array');
|
27
|
-
list.videos.forEach((video) => {
|
28
|
-
video.should.be.an('object');
|
29
|
-
video.should.have.ownPropertyDescriptor('duration');
|
30
|
-
video.duration.should.be.a('string');
|
31
|
-
video.should.have.ownPropertyDescriptor('path');
|
32
|
-
video.path.should.be.a('string');
|
33
|
-
video.should.have.ownPropertyDescriptor('profile');
|
34
|
-
video.profile.should.be.an('object');
|
35
|
-
video.profile.should.have.ownPropertyDescriptor('name');
|
36
|
-
video.profile.name.should.be.an('string');
|
37
|
-
video.profile.should.have.ownPropertyDescriptor('url');
|
38
|
-
video.profile.url.should.be.an('string');
|
39
|
-
video.should.have.ownPropertyDescriptor('title');
|
40
|
-
video.title.should.be.a('string');
|
41
|
-
video.should.have.ownPropertyDescriptor('url');
|
42
|
-
video.url.should.be.a('string');
|
43
|
-
video.should.have.ownPropertyDescriptor('views');
|
44
|
-
video.views.should.be.a('string');
|
45
|
-
});
|
46
|
-
|
47
|
-
const previous = await list.previous();
|
48
|
-
previous.should.be.an('object');
|
49
|
-
previous.pagination.should.be.an('object');
|
50
|
-
previous.pagination.page.should.be.equals(1);
|
51
|
-
previous.pagination.pages.should.be.an('array');
|
52
|
-
previous.pagination.pages[0].should.be.a('number');
|
53
|
-
previous.hasNext.should.be.a('function');
|
54
|
-
previous.hasNext().should.be.equals(true);
|
55
|
-
previous.hasPrevious.should.be.a('function');
|
56
|
-
previous.hasPrevious().should.be.equals(false);
|
57
|
-
previous.next.should.be.a('function');
|
58
|
-
previous.previous.should.be.a('function');
|
59
|
-
previous.videos.should.be.an('array');
|
60
|
-
previous.videos.forEach((video) => {
|
61
|
-
video.should.be.an('object');
|
62
|
-
video.should.have.ownPropertyDescriptor('duration');
|
63
|
-
video.duration.should.be.a('string');
|
64
|
-
video.should.have.ownPropertyDescriptor('path');
|
65
|
-
video.path.should.be.a('string');
|
66
|
-
video.should.have.ownPropertyDescriptor('profile');
|
67
|
-
video.profile.should.be.an('object');
|
68
|
-
video.profile.should.have.ownPropertyDescriptor('name');
|
69
|
-
video.profile.name.should.be.an('string');
|
70
|
-
video.profile.should.have.ownPropertyDescriptor('url');
|
71
|
-
video.profile.url.should.be.an('string');
|
72
|
-
video.should.have.ownPropertyDescriptor('title');
|
73
|
-
video.title.should.be.a('string');
|
74
|
-
video.should.have.ownPropertyDescriptor('url');
|
75
|
-
video.url.should.be.a('string');
|
76
|
-
video.should.have.ownPropertyDescriptor('views');
|
77
|
-
video.views.should.be.a('string');
|
78
|
-
});
|
79
|
-
|
80
|
-
const next = await list.next();
|
81
|
-
next.should.be.an('object');
|
82
|
-
next.pagination.should.be.an('object');
|
83
|
-
next.pagination.page.should.be.equals(3);
|
84
|
-
next.pagination.pages.should.be.an('array');
|
85
|
-
next.pagination.pages[0].should.be.a('number');
|
86
|
-
next.hasNext.should.be.a('function');
|
87
|
-
next.hasNext().should.be.equals(true);
|
88
|
-
next.hasPrevious.should.be.a('function');
|
89
|
-
next.hasPrevious().should.be.equals(true);
|
90
|
-
next.next.should.be.a('function');
|
91
|
-
next.previous.should.be.a('function');
|
92
|
-
next.videos.should.be.an('array');
|
93
|
-
next.videos.forEach((video) => {
|
94
|
-
video.should.be.an('object');
|
95
|
-
video.should.have.ownPropertyDescriptor('duration');
|
96
|
-
video.duration.should.be.a('string');
|
97
|
-
video.should.have.ownPropertyDescriptor('path');
|
98
|
-
video.path.should.be.a('string');
|
99
|
-
video.should.have.ownPropertyDescriptor('profile');
|
100
|
-
video.profile.should.be.an('object');
|
101
|
-
video.profile.should.have.ownPropertyDescriptor('name');
|
102
|
-
video.profile.name.should.be.an('string');
|
103
|
-
video.profile.should.have.ownPropertyDescriptor('url');
|
104
|
-
video.profile.url.should.be.an('string');
|
105
|
-
video.should.have.ownPropertyDescriptor('title');
|
106
|
-
video.title.should.be.a('string');
|
107
|
-
video.should.have.ownPropertyDescriptor('url');
|
108
|
-
video.url.should.be.a('string');
|
109
|
-
video.should.have.ownPropertyDescriptor('views');
|
110
|
-
video.views.should.be.a('string');
|
111
|
-
});
|
112
|
-
|
113
|
-
await list.refresh();
|
114
|
-
}).timeout(10000);
|
115
|
-
|
116
|
-
it('should fail when page parameter is beyond limit', async () => {
|
117
|
-
let err;
|
118
|
-
try {
|
119
|
-
await verified({ page: Number.MAX_SAFE_INTEGER + 1 });
|
120
|
-
} catch (error) {
|
121
|
-
err = error;
|
122
|
-
} finally {
|
123
|
-
err.should.be.an('error');
|
124
|
-
}
|
125
|
-
}).timeout(10000);
|
126
|
-
|
127
|
-
it('should fail when page parameter is less than 0', async () => {
|
128
|
-
let err;
|
129
|
-
try {
|
130
|
-
await verified({ page: -1 });
|
131
|
-
} catch (error) {
|
132
|
-
err = error;
|
133
|
-
} finally {
|
134
|
-
err.should.be.an('error');
|
135
|
-
}
|
136
|
-
}).timeout(10000);
|
137
|
-
|
138
|
-
});
|
1
|
+
/* eslint-disable padded-blocks */
|
2
|
+
|
3
|
+
const chai = require('chai');
|
4
|
+
const verified = require('./verified');
|
5
|
+
|
6
|
+
before(() => {
|
7
|
+
chai.should();
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('api/videos/verified', () => {
|
11
|
+
|
12
|
+
it('should list verified video pages', async () => {
|
13
|
+
const list = await verified({ page: 2 });
|
14
|
+
|
15
|
+
list.should.be.an('object');
|
16
|
+
list.pagination.should.be.an('object');
|
17
|
+
list.pagination.page.should.be.equals(2);
|
18
|
+
list.pagination.pages.should.be.an('array');
|
19
|
+
list.pagination.pages[0].should.be.a('number');
|
20
|
+
list.hasNext.should.be.a('function');
|
21
|
+
list.hasNext().should.be.equals(true);
|
22
|
+
list.hasPrevious.should.be.a('function');
|
23
|
+
list.hasPrevious().should.be.equals(true);
|
24
|
+
list.next.should.be.a('function');
|
25
|
+
list.previous.should.be.a('function');
|
26
|
+
list.videos.should.be.an('array');
|
27
|
+
list.videos.forEach((video) => {
|
28
|
+
video.should.be.an('object');
|
29
|
+
video.should.have.ownPropertyDescriptor('duration');
|
30
|
+
video.duration.should.be.a('string');
|
31
|
+
video.should.have.ownPropertyDescriptor('path');
|
32
|
+
video.path.should.be.a('string');
|
33
|
+
video.should.have.ownPropertyDescriptor('profile');
|
34
|
+
video.profile.should.be.an('object');
|
35
|
+
video.profile.should.have.ownPropertyDescriptor('name');
|
36
|
+
video.profile.name.should.be.an('string');
|
37
|
+
video.profile.should.have.ownPropertyDescriptor('url');
|
38
|
+
video.profile.url.should.be.an('string');
|
39
|
+
video.should.have.ownPropertyDescriptor('title');
|
40
|
+
video.title.should.be.a('string');
|
41
|
+
video.should.have.ownPropertyDescriptor('url');
|
42
|
+
video.url.should.be.a('string');
|
43
|
+
video.should.have.ownPropertyDescriptor('views');
|
44
|
+
video.views.should.be.a('string');
|
45
|
+
});
|
46
|
+
|
47
|
+
const previous = await list.previous();
|
48
|
+
previous.should.be.an('object');
|
49
|
+
previous.pagination.should.be.an('object');
|
50
|
+
previous.pagination.page.should.be.equals(1);
|
51
|
+
previous.pagination.pages.should.be.an('array');
|
52
|
+
previous.pagination.pages[0].should.be.a('number');
|
53
|
+
previous.hasNext.should.be.a('function');
|
54
|
+
previous.hasNext().should.be.equals(true);
|
55
|
+
previous.hasPrevious.should.be.a('function');
|
56
|
+
previous.hasPrevious().should.be.equals(false);
|
57
|
+
previous.next.should.be.a('function');
|
58
|
+
previous.previous.should.be.a('function');
|
59
|
+
previous.videos.should.be.an('array');
|
60
|
+
previous.videos.forEach((video) => {
|
61
|
+
video.should.be.an('object');
|
62
|
+
video.should.have.ownPropertyDescriptor('duration');
|
63
|
+
video.duration.should.be.a('string');
|
64
|
+
video.should.have.ownPropertyDescriptor('path');
|
65
|
+
video.path.should.be.a('string');
|
66
|
+
video.should.have.ownPropertyDescriptor('profile');
|
67
|
+
video.profile.should.be.an('object');
|
68
|
+
video.profile.should.have.ownPropertyDescriptor('name');
|
69
|
+
video.profile.name.should.be.an('string');
|
70
|
+
video.profile.should.have.ownPropertyDescriptor('url');
|
71
|
+
video.profile.url.should.be.an('string');
|
72
|
+
video.should.have.ownPropertyDescriptor('title');
|
73
|
+
video.title.should.be.a('string');
|
74
|
+
video.should.have.ownPropertyDescriptor('url');
|
75
|
+
video.url.should.be.a('string');
|
76
|
+
video.should.have.ownPropertyDescriptor('views');
|
77
|
+
video.views.should.be.a('string');
|
78
|
+
});
|
79
|
+
|
80
|
+
const next = await list.next();
|
81
|
+
next.should.be.an('object');
|
82
|
+
next.pagination.should.be.an('object');
|
83
|
+
next.pagination.page.should.be.equals(3);
|
84
|
+
next.pagination.pages.should.be.an('array');
|
85
|
+
next.pagination.pages[0].should.be.a('number');
|
86
|
+
next.hasNext.should.be.a('function');
|
87
|
+
next.hasNext().should.be.equals(true);
|
88
|
+
next.hasPrevious.should.be.a('function');
|
89
|
+
next.hasPrevious().should.be.equals(true);
|
90
|
+
next.next.should.be.a('function');
|
91
|
+
next.previous.should.be.a('function');
|
92
|
+
next.videos.should.be.an('array');
|
93
|
+
next.videos.forEach((video) => {
|
94
|
+
video.should.be.an('object');
|
95
|
+
video.should.have.ownPropertyDescriptor('duration');
|
96
|
+
video.duration.should.be.a('string');
|
97
|
+
video.should.have.ownPropertyDescriptor('path');
|
98
|
+
video.path.should.be.a('string');
|
99
|
+
video.should.have.ownPropertyDescriptor('profile');
|
100
|
+
video.profile.should.be.an('object');
|
101
|
+
video.profile.should.have.ownPropertyDescriptor('name');
|
102
|
+
video.profile.name.should.be.an('string');
|
103
|
+
video.profile.should.have.ownPropertyDescriptor('url');
|
104
|
+
video.profile.url.should.be.an('string');
|
105
|
+
video.should.have.ownPropertyDescriptor('title');
|
106
|
+
video.title.should.be.a('string');
|
107
|
+
video.should.have.ownPropertyDescriptor('url');
|
108
|
+
video.url.should.be.a('string');
|
109
|
+
video.should.have.ownPropertyDescriptor('views');
|
110
|
+
video.views.should.be.a('string');
|
111
|
+
});
|
112
|
+
|
113
|
+
await list.refresh();
|
114
|
+
}).timeout(10000);
|
115
|
+
|
116
|
+
it('should fail when page parameter is beyond limit', async () => {
|
117
|
+
let err;
|
118
|
+
try {
|
119
|
+
await verified({ page: Number.MAX_SAFE_INTEGER + 1 });
|
120
|
+
} catch (error) {
|
121
|
+
err = error;
|
122
|
+
} finally {
|
123
|
+
err.should.be.an('error');
|
124
|
+
}
|
125
|
+
}).timeout(10000);
|
126
|
+
|
127
|
+
it('should fail when page parameter is less than 0', async () => {
|
128
|
+
let err;
|
129
|
+
try {
|
130
|
+
await verified({ page: -1 });
|
131
|
+
} catch (error) {
|
132
|
+
err = error;
|
133
|
+
} finally {
|
134
|
+
err.should.be.an('error');
|
135
|
+
}
|
136
|
+
}).timeout(10000);
|
137
|
+
|
138
|
+
});
|
package/lib/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
module.exports = require('./xvideos');
|
1
|
+
module.exports = require('./xvideos');
|
package/lib/xvideos.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
module.exports = require('./api');
|
1
|
+
module.exports = require('./api');
|
package/lib/xvideos.spec.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
const chai = require('chai');
|
2
|
-
const xvideos = require('.');
|
3
|
-
|
4
|
-
before(() => {
|
5
|
-
chai.should();
|
6
|
-
});
|
7
|
-
|
8
|
-
describe('xvideos', () => {
|
9
|
-
it('should have xvideos api functions', async () => {
|
10
|
-
xvideos.should.be.an('object');
|
11
|
-
xvideos.videos.should.be.an('object');
|
12
|
-
xvideos.videos.dashboard.should.be.a('function');
|
13
|
-
xvideos.videos.fresh.should.be.a('function');
|
14
|
-
xvideos.videos.best.should.be.a('function');
|
15
|
-
xvideos.videos.verified.should.be.a('function');
|
16
|
-
xvideos.videos.details.should.be.a('function');
|
17
|
-
xvideos.videos.newFresh.should.be.a('function');
|
18
|
-
}).timeout(10000);
|
19
|
-
});
|
1
|
+
const chai = require('chai');
|
2
|
+
const xvideos = require('.');
|
3
|
+
|
4
|
+
before(() => {
|
5
|
+
chai.should();
|
6
|
+
});
|
7
|
+
|
8
|
+
describe('xvideos', () => {
|
9
|
+
it('should have xvideos api functions', async () => {
|
10
|
+
xvideos.should.be.an('object');
|
11
|
+
xvideos.videos.should.be.an('object');
|
12
|
+
xvideos.videos.dashboard.should.be.a('function');
|
13
|
+
xvideos.videos.fresh.should.be.a('function');
|
14
|
+
xvideos.videos.best.should.be.a('function');
|
15
|
+
xvideos.videos.verified.should.be.a('function');
|
16
|
+
xvideos.videos.details.should.be.a('function');
|
17
|
+
xvideos.videos.newFresh.should.be.a('function');
|
18
|
+
}).timeout(10000);
|
19
|
+
});
|