Skip to content

Commit 6c212dc

Browse files
committed
Added bumpItems method
1 parent 2efb0f3 commit 6c212dc

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

interfaces/ISales.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ OPSkinsAPI.prototype.getListingLimit = function(callback) {
6565
};
6666

6767
OPSkinsAPI.prototype.listItems = function(items, callback) {
68-
if (!(items instanceof Array)) {
68+
if (!Array.isArray(items)) {
6969
items = [items];
7070
}
7171

@@ -79,7 +79,27 @@ OPSkinsAPI.prototype.listItems = function(items, callback) {
7979
});
8080
};
8181

82+
OPSkinsAPI.prototype.bumpItems = function(saleids, callback) {
83+
if (!Array.isArray(saleids)) {
84+
saleids = [saleids];
85+
}
86+
87+
this._requireKey();
88+
this.post("ISales", "BumpItems", 1, {"items": saleids.join(',')}, function(err, res, meta) {
89+
if (err) {
90+
callback(err);
91+
return;
92+
}
93+
94+
callback(null, meta.balance, res.sales);
95+
});
96+
};
97+
8298
OPSkinsAPI.prototype.returnItems = function(saleids, callback) {
99+
if (!Array.isArray(saleids)) {
100+
saleids = [saleids];
101+
}
102+
83103
this._requireKey();
84104
this.post("ISales", "ReturnItems", 1, {"items": saleids.join(',')}, function(err, res, meta) {
85105
if (err && !res) {

0 commit comments

Comments
 (0)