scrapebadger 0.60.0 → 0.60.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
9
  var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
10
10
 
11
11
  // src/internal/version.ts
12
- var SDK_VERSION = "0.60.0";
12
+ var SDK_VERSION = "0.60.1";
13
13
 
14
14
  // src/internal/exceptions.ts
15
15
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -6591,9 +6591,8 @@ var GumtreeClient = class {
6591
6591
  * Full listing: description, every attribute, images, location, seller and
6592
6592
  * similar ads. Motors listings carry the full vehicle spec.
6593
6593
  *
6594
- * @param listingId - Gumtree listing id — the number at the end of the
6595
- * listing URL (uk/au: ~10 digits; za: the full 26-digit ad id, not the
6596
- * short one).
6594
+ * @param listingId - Gumtree listing id from the end of the listing URL
6595
+ * (uk/au: ~10 digits; za: the listing ref, e.g. `"ls26bvmcpnsqmz7l9jz"`).
6597
6596
  * @param options - Optional parameters (market).
6598
6597
  * @throws NotFoundError - If the listing does not exist or has expired.
6599
6598
  */
@@ -6606,8 +6605,8 @@ var GumtreeClient = class {
6606
6605
  * Every live listing by the seller of `listingId`. Gumtree keys a seller's
6607
6606
  * ad list by one of their ads, so any listing id of theirs works.
6608
6607
  *
6609
- * @param listingId - Any Gumtree listing id belonging to the seller (za: the
6610
- * 26-digit id).
6608
+ * @param listingId - Any Gumtree listing id belonging to the seller (za: a
6609
+ * listing ref, e.g. `"ls26bvmcpnsqmz7l9jz"`).
6611
6610
  * @param options - Page number (1-50), or `{ page, market }`.
6612
6611
  */
6613
6612
  async getSellerListings(listingId, options = {}) {
@@ -6630,7 +6629,8 @@ var GumtreeClient = class {
6630
6629
  }
6631
6630
  /**
6632
6631
  * Resolve a place name or postcode prefix to Gumtree locations. The `id`
6633
- * (au/za) or `name` (uk) is what {@link search} takes as `location`.
6632
+ * (au: a number; za: a ref such as `"pfw8k"`) or `name` (uk) is what
6633
+ * {@link search} takes as `location`.
6634
6634
  *
6635
6635
  * @param query - Town, area or postcode prefix (min 2 chars), e.g. `"manch"` or `"SW1A"`.
6636
6636
  * @param options - Optional parameters (market).
@@ -6643,9 +6643,10 @@ var GumtreeClient = class {
6643
6643
  }
6644
6644
  /**
6645
6645
  * Browse Gumtree's location tree. uk: UK -> nations -> counties -> towns;
6646
- * au: states -> regions -> areas; za: provinces -> towns.
6646
+ * au: states -> regions -> areas; za: provinces -> towns and suburbs.
6647
6647
  *
6648
- * @param options - Location id to list the children of, or
6648
+ * @param options - Location id (uk/au: a number; za: a ref such as
6649
+ * `"dkp8y"` for Gauteng) to list the children of, or
6649
6650
  * `{ parent_id, market }`. Unset = the market's root (the whole country).
6650
6651
  */
6651
6652
  async listLocations(options = {}) {
@@ -6654,10 +6655,11 @@ var GumtreeClient = class {
6654
6655
  });
6655
6656
  }
6656
6657
  /**
6657
- * Browse Gumtree's category tree. A node's `slug` (uk) or `id` (au/za) is
6658
- * the {@link search} category.
6658
+ * Browse Gumtree's category tree. A node's `slug` (uk) or `id` (au: a
6659
+ * number; za: a ref such as `"p6dnh"`) is the {@link search} category.
6659
6660
  *
6660
- * @param options - Category id to list the children of, or
6661
+ * @param options - Category id (uk/au: a number; za: a ref such as
6662
+ * `"l4dq6"` for Vehicles) to list the children of, or
6661
6663
  * `{ parent_id, market }`. Unset = the market's root (all categories).
6662
6664
  */
6663
6665
  async listCategories(options = {}) {
@@ -6674,7 +6676,7 @@ var GumtreeClient = class {
6674
6676
  }
6675
6677
  };
6676
6678
  function treeParams(options) {
6677
- const { parent_id, market } = typeof options === "number" ? { parent_id: options } : options;
6679
+ const { parent_id, market } = typeof options === "object" ? options : { parent_id: options };
6678
6680
  return { parent_id, market };
6679
6681
  }
6680
6682