All Projects → bnt44 → Wykop Es6

bnt44 / Wykop Es6

Licence: mit
Wykop.pl API library

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Wykop Es6

Uniswap Python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 191 (+1023.53%)
Mutual labels:  api, wrapper
Twitchio
TwitchIO - An Async Bot/API wrapper for Twitch made in Python.
Stars: ✭ 268 (+1476.47%)
Mutual labels:  api, wrapper
Node Fb Messenger
✉️ Facebook Messenger Platform Node.js API Wrapper
Stars: ✭ 206 (+1111.76%)
Mutual labels:  api, wrapper
Spaces Api
An API wrapper for DigitalOcean's Spaces object storage designed for easy use.
Stars: ✭ 166 (+876.47%)
Mutual labels:  api, wrapper
Jsstore
A complete IndexedDB wrapper with SQL like syntax.
Stars: ✭ 430 (+2429.41%)
Mutual labels:  wrapper, javascript-library
Wiki
Wikipedia Interface for Node.js
Stars: ✭ 180 (+958.82%)
Mutual labels:  api, wrapper
Zenpy
Python wrapper for the Zendesk API
Stars: ✭ 222 (+1205.88%)
Mutual labels:  api, wrapper
Mastodonkit
MastodonKit is a Swift Framework that wraps Mastodon's API
Stars: ✭ 134 (+688.24%)
Mutual labels:  api, wrapper
Canvasapi
Python API wrapper for Instructure's Canvas LMS. Easily manage courses, users, gradebooks, and more.
Stars: ✭ 306 (+1700%)
Mutual labels:  api, wrapper
Node Zendesk
a zendesk API client library for use with node.js
Stars: ✭ 288 (+1594.12%)
Mutual labels:  api, wrapper
Coinbasepro Csharp
The unofficial .NET/C# client library for the Coinbase Pro/GDAX API
Stars: ✭ 143 (+741.18%)
Mutual labels:  api, wrapper
Atlassian Python Api
Atlassian Python REST API wrapper
Stars: ✭ 564 (+3217.65%)
Mutual labels:  api, wrapper
Mailjet Apiv3 Nodejs
[API v3] Official Mailjet API v3 NodeJS wrapper
Stars: ✭ 137 (+705.88%)
Mutual labels:  api, wrapper
Fbrecog
An unofficial python wrapper for the Facebook face recognition endpoint
Stars: ✭ 184 (+982.35%)
Mutual labels:  api, wrapper
Python Twitch Client
Python wrapper for Twitch API
Stars: ✭ 137 (+705.88%)
Mutual labels:  api, wrapper
Api struct
API wrapper builder with response serialization
Stars: ✭ 224 (+1217.65%)
Mutual labels:  api, wrapper
Kayn
superagent-inspired Node.js lib (w/ **some** TypeScript support) for accessing Riot's League of Legend's API (discord: cnguy#3614)
Stars: ✭ 122 (+617.65%)
Mutual labels:  api, wrapper
Colore
A powerful C# library for Razer Chroma's SDK
Stars: ✭ 121 (+611.76%)
Mutual labels:  api, wrapper
Pycoingecko
Python wrapper for the CoinGecko API
Stars: ✭ 270 (+1488.24%)
Mutual labels:  api, wrapper
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+3176.47%)
Mutual labels:  api, wrapper

wykop-es6 (deprecated, update in progress)

david-dm Code Climate npm npm

Instalacja

npm install wykop-es6

Dokumentacja Wykop API

http://www.wykop.pl/dla-programistow/dokumentacja/

Przykładowe użycie (promises)

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

Przykładowe użycie (callback)

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

Opcje

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

Parametry metody .request

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

TODO: napisać readme od nowa

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].