
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
wykop-es6-2
Advanced tools
npm install wykop-es6-2
var Wykop = require('wykop-es6');
var wykop = new Wykop('appkey', 'secretkey');
var user = new Wykop('appkey', 'secretkey');
// logujemy usera
user.login('accountkey')
.then(function(res) {
// user zostal zalogowany
console.log(res);
// dodajemy wpis
return user.request('Entries', 'Add', {post: {body: "test", embed: "http://plik.jpg"}});
})
.then(function(res) {
console.log(res);
// pobieramy stream mikrobloga jako niezalogowani
return wykop.request('Stream', 'Index', {api: {page: 1}});
})
.then(function(res) {
console.log(res);
var firstEntryId = res[0].id; // id pierwszego wpisu ze streamu
// plusujemy pierwszy wpis ze streamu wpisów! Używamy znów zalogowanej instancji klasy Wykop - user
return user.request('Entries', 'Vote', { params: ['entry', firstEntryId] });
})
.then(function(res) {
console.log(res);
})
.catch(function(err) {
console.log(err);
});
user.login(accountkey, function(error, res) {
if (error) throw error;
console.log(res);
user.request('Entries', 'Add', {
post: {
body: "test",
embed: "http://plik.jpg"
}
}, function(error, res) {
if (error) throw error;
console.log(res);
});
});
var options = {
output: 'clear', // wszystkie pola odpowiedzi zostaną wyczyszczone z kodu HTML.
format: 'jsonp', // format odpowiedzi, domylnie json, do wyboru xml lub jsonp
timeout: '30000', // czas (w ms) oczekiwania na odpowiedź serwera wykopu, domyślnie 30000ms (30 sekund)
useragent: 'WypokAgent', // useragent, domyslnie WypokAgent
ssl: false // czy wysylac requesty pod szyfrowany adres api
};
var wykop = new Wykop(<appkey>, <secretkey>, options);
var reqOptions = {
params: [ ], //parametry metody np. [14723797, 48940057]
api: { }, // parametry API (poza userkey, appkey) np. {page: 3, sort: 'votes'}
post: { } // Parametry POST np. {body: 'tekst', embed: 'link'}
};
wykop.request('rtype', 'rmethod', reqOptions);
FAQs
Wykop.pl API wrapper
The npm package wykop-es6-2 receives a total of 1 weekly downloads. As such, wykop-es6-2 popularity was classified as not popular.
We found that wykop-es6-2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.