sign-api-wykop

1.0.2 • Public • Published

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;
  });

Readme

Keywords

Package Sidebar

Install

npm i sign-api-wykop

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

2.53 kB

Total Files

4

Last publish

Collaborators

  • skorotkiewicz