-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathtextpro.js
125 lines (110 loc) · 4.31 KB
/
textpro.js
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
//for Module
const bent = require('bent')
const baseURI = 'https://server-api-rey.herokuapp.com'
//Pakai aja kalau rest API di atas erorr
const baseURI2 = 'https://api.dhika.xyz'
module.exports.blackpink = function blackpink(text1) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/blackpink?text=' + encodeURIComponent(text1) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.pornhub = function pornhub(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/pornhub?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.vintage = function vintage(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/vintage?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.avengers = function avengers(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/avengers?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.marvel = function marvel(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/marvel?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.ninja = function ninja(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/ninja?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.wolf = function wolf(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/wolf?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.girlgraffiti = function girlgraffiti(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/girl-grafiti?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.wolf2 = function wolf2(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/wolf2?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.marvel2 = function marvel2(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/marvel2?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.space3d = function space3d(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/space3d?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.stone = function stone(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/ston?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.lion = function lion(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/lion?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.steel = function steel(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/steel?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apirey')
.then(resolve)
.catch(reject)
})
}
module.exports.grafiti = function grafiti(text1, text2) {
return new Promise((resolve, reject) => {
bent('buffer')(baseURI+'/api/textprome/grafiti?text1=' + encodeURIComponent(text1) + '&text2=' + encodeURIComponent(text2) + '&apikey=apireu')
.then(resolve)
.catch(reject)
})
}