sign-api-wykop
v1.0.2
Published
> Sign and query the Wykop.pl API in a simple way
Downloads
3
Readme
sign-api-wykop
Sign and query the Wykop.pl API in a simple way
Install
$ npm install sign-api-wykop
// or
$ yarn add sign-api-wykop
Import
const { signApi } = require("sign-api-wykop");
Usage
signApi(url, params, APPKEY, SECRET)
signApi(
`Search/Links`,
{ q: "hello", votes: 100 },
process.env.APPKEY,
process.env.SECRET
);
wykopRequest(url, params, APPKEY, SECRET)
wykopRequest(
"Search/Links",
{ q: "hello", votes: 100 },
process.env.APPKEY,
process.env.SECRET
);
Example
wykopRequest(
"Entries/Upvoters/64834157/",
{},
process.env.APPKEY,
process.env.SECRET
)
.then((res) => {
res.data.data.map((d) => {
return console.log(d.author);
});
})
.catch((error) => {
throw error;
});