README
wykop-sdk1-node
It's SDK for Wykop.pl API v1 written in JavaScript.
Install it with npm:
npm install wykop-sdk1-node
Sample use:
var Wykop = require('wykop-sdk1-node'); //importing library
//can be unspecified, it'll still work
var options = {
'ssl': true, //true for https requests
'outputClean': true, //true to get your output cleaned from html
'userAgent': 'Cronox obserwuje cie' //User-Agent sent in request. must be specified (but it's not verified, insert here anything you want like this)
}
var wykop = Wykop(appkey, secretkey, options); //creating new instance of SDK. you can do it for every account you use in your app
//log in your user with accountkey
wykop.login(accountkey);
//create parameters object for your request
var params = {
'method': [2137]
}
//send request
//request types, methods and response types are available in docs:
// https://github.com/p1c2u/wykop-sdk
// or here (be aware of fake info):
// https://www.wykop.pl/dla-programistow/dokumentacja/
wykop.request('entries', 'index', params, function(response) {
console.log(response.body);
});