Skip to content

Commit 87a5731

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 57ec320 + 0788d29 commit 87a5731

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
test.js
2+
node_modules/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ then you may use [`getLowestPrices`](#getlowestpricesappid-callback).
245245
## ISales
246246

247247
### getSales([req, ]callback)
248-
- `req` - Optional. An object containing request filters. Available filters:
248+
- `req` - **Required.** An object containing request filters. Available filters:
249+
- `type` - **Required.** Provide a [`SaleStatus`](#sale-status) value here to only return sales in that status. Default (omitted) is to get all statuses.
249250
- `page` - The number of the page you would like. Currently, there are 10,000 sales returned per page. Default is page 1.
250-
- `type` - Provide a [`SaleStatus`](#sale-status) value here to only return sales in that status. Default (omitted) is to get all statuses.
251251
- `callback` - A function to be called when the request completes
252252
- `err` - An `Error` object on failure, or `null` on success
253253
- `totalPages` - A number containing the total number of pages that exist in this listing

interfaces/ISales.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ OPSkinsAPI.prototype.getSales = function(req, callback) {
66
req = {};
77
}
88

9+
if (!req.type) {
10+
throw new Error("The \"type\" filter is required");
11+
}
12+
913
this._requireKey();
1014
this.get("ISales", "GetSales", 1, req, function(err, res, meta) {
1115
if (err) {

0 commit comments

Comments
 (0)