Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Allegro.pl WebAPI client for Node.js.
npm install allegro
See examples/.
Creates API client. Available options:
key
- required WebAPI key, can be generated in My Allegro,login
, passwords
or passwordHash
- required credentials are needed to call some of methods (I don't know why but even for those not related to My Allegro), so in general you should provide them. password
can be replaced with passwordHash
which is encoded in base64 sha-256 hash from password (base64(sha256(password)))
,countryId
- optional, country identifier, default: 1 (Poland).Callback function gets two arguments:
Example:
var allegro = require('allegro');
var options = {
key: 'your_webapi_key',
login: 'foo',
passwordHash: 'bar'
};
allegro.createClient(options, function (error, client) {
...
});
Get Category instance. Example:
allegro.createClient({ … }, function (error, client) {
client.getCategory(149, function (error, category) {
console.log(category.name); // 'Samochody'
});
});
Get Item instance. Example:
allegro.createClient({ … }, function (error, client) {
client.getItem(3482560106, function (error, item) {
console.log(item.name); // 'IGŁA BMW E90'
});
});
Get User instance. Example:
allegro.createClient({ … }, function (error, client) {
client.getUser(26729811, function (error, user) {
console.log(user.login); // 'stendi_pl'
});
});
client.on('buynow', function (itemId) {
console.log('Somebody just bought:' + itemId);
});
Returned by client.getCategory
.
id
int,name
string,parentId
int.getParent(callback)
get Category instance of parent. Callback function gets Error and Category instance. Example:allegro.createClient({ … }, function (err, client) {
client.getCategory(122234, function (err, category) {
category.getParent(function (err, category) {
console.log(category.name);
})
});
});
Returned by client.getItem
.
id
int,name
string.getSeller(callback)
get User instance of seller. Callback function gets Error and User instance. Example:allegro.createClient({ … }, function (error, client) {
client.getItem(3509260334, function (error, item) {
item.getSeller(function(error, user) {
console.log(user.login); // 'stendi_pl'
})
});
});
Returned by client.getUser
.
id
int,login
string,rating
int,createdAt
Date,isAllegroStandard
bool.FAQs
Allegro.pl WebAPI client
We found that allegro demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.