https://github.com/skorotkiewicz/sign-api-wykop
Sign and query the Wykop.pl API in a simple way
https://github.com/skorotkiewicz/sign-api-wykop
wykopapi wykoppl
Last synced: 3 months ago
JSON representation
Sign and query the Wykop.pl API in a simple way
- Host: GitHub
- URL: https://github.com/skorotkiewicz/sign-api-wykop
- Owner: skorotkiewicz
- Created: 2022-04-04T15:06:42.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-04T15:32:34.000Z (about 3 years ago)
- Last Synced: 2025-03-17T20:08:32.307Z (3 months ago)
- Topics: wykopapi, wykoppl
- Language: JavaScript
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sign-api-wykop
> Sign and query the Wykop.pl API in a simple way
## Install
```sh
$ npm install sign-api-wykop
// or
$ yarn add sign-api-wykop
```## Import
```javascript
const { signApi, wykopRequest } = require("sign-api-wykop");
```## Usage
signApi(url, params, APPKEY, SECRET)
```javascript
signApi(
`Search/Links`,
{ q: "hello", votes: 100 },
process.env.APPKEY,
process.env.SECRET
);
```wykopRequest(url, params, APPKEY, SECRET)
```javascript
wykopRequest(
"Search/Links",
{ q: "hello", votes: 100 },
process.env.APPKEY,
process.env.SECRET
);
```## Example
```javascript
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;
});
```