Repository navigation
Expand file tree
/
Copy pathexample.js
More file actions
133 lines (118 loc) · 2.41 KB
/
Copy pathexample.js
File metadata and controls
133 lines (118 loc) · 2.41 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
const ramapi = require("ram-api");
const apiv = "v4"; //v2 and up are available ram api versions note versions
const apikey = "apikey"; //ask for a key by contacting support
//! note ram api has a 5 calls per 5 seconds
ramapi.apiversion(apiv); // outputs rather the api is outdated or not also this console logs for you
ramapi
.apihug(apiv, apikey)
.then(async (data) => {
console.log(await data.data.url); // logs the url
})
.catch((err) => {
console.log(err);
});
ramapi
.apigm(apiv, apikey)
.then(async (data) => {
console.log(data.url); //url
console.log(data.text); //text
})
.catch((err) => {
console.log(err);
});
ramapi
.apign(apiv, apikey)
.then(async (data) => {
console.log(data.url); //url
console.log(data.text); //text
})
.catch((err) => {
console.log(err);
});
ramapi
.apislap(apiv, apikey, "user1", "user2")
.then(async (data) => {
console.log(data.url); //url
console.log(data.text); //texts (it puts this together so the user1 and user2 would be needed)
})
.catch((err) => {
console.log(err);
});
ramapi
.apikiss(apiv, apikey)
.then((data) => {
console.log(data.url); // returns the url
})
.catch((err) => {
console.log(err);
});
ramapi
.api8ball(apiv, apikey)
.then((data) => {
console.log(data.text); // text
})
.catch((err) => {
console.log(err);
});
ramapi
.apihello(apiv, apikey)
.then((data) => {
console.log(data.text); //text
})
.catch((err) => {
console.log(err);
});
ramapi
.apicuddle(apiv, apikey)
.then((data) => {
console.log(data.url); //url
})
.catch((err) => {
console.log(err);
});
ramapi
.apitired(apiv, apikey)
.then((data) => {
console.log(data.url); //url
})
.catch((err) => {
console.log(err);
});
ramapi
.apisick(apiv, apikey)
.then((data) => {
console.log(data.url); //url
})
.catch((err) => {
console.log(err);
});
ramapi
.apimeme(apiv, apikey)
.then((data) => {
let url = data.url;
let title = data.title;
let author = data.author;
let nsfw = data.nsfw;
let postlink = data.postLink;
console.log(`${url} \n ${title} \n ${author} \n ${nsfw} \n ${postlink}`);
})
.catch((err) => {
console.log(err);
});
ramapi
.apicry(apiv, apikey)
.then((data) => {
console.log(data.url); //url
console.log(data.text); //text
})
.catch((err) => {
console.log(err);
});
ramapi
.apilol(apiv, apikey)
.then((data) => {
console.log(data.url); //url
})
.catch((err) => {
console.log(err);
});