scrapebadger 0.65.0 → 0.67.0

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.mjs CHANGED
@@ -3,7 +3,7 @@ import { EventEmitter } from 'events';
3
3
  import WebSocket from 'ws';
4
4
 
5
5
  // src/internal/version.ts
6
- var SDK_VERSION = "0.65.0";
6
+ var SDK_VERSION = "0.67.0";
7
7
 
8
8
  // src/internal/exceptions.ts
9
9
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -3878,10 +3878,10 @@ var SearchClient3 = class {
3878
3878
  async posts(options) {
3879
3879
  return this.client.request("/v1/reddit/search/posts", {
3880
3880
  params: {
3881
- query: options.query,
3881
+ q: options.query,
3882
3882
  subreddit: options.subreddit,
3883
3883
  sort: options.sort,
3884
- time: options.time,
3884
+ t: options.time,
3885
3885
  after: options.after,
3886
3886
  limit: options.limit
3887
3887
  }
@@ -3912,7 +3912,7 @@ var SearchClient3 = class {
3912
3912
  async subreddits(options) {
3913
3913
  return this.client.request("/v1/reddit/search/subreddits", {
3914
3914
  params: {
3915
- query: options.query,
3915
+ q: options.query,
3916
3916
  after: options.after,
3917
3917
  limit: options.limit
3918
3918
  }
@@ -3943,7 +3943,7 @@ var SearchClient3 = class {
3943
3943
  async users(options) {
3944
3944
  return this.client.request("/v1/reddit/search/users", {
3945
3945
  params: {
3946
- query: options.query,
3946
+ q: options.query,
3947
3947
  after: options.after,
3948
3948
  limit: options.limit
3949
3949
  }
@@ -3980,7 +3980,7 @@ var SearchClient3 = class {
3980
3980
  params: {
3981
3981
  domain: options.domain,
3982
3982
  sort: options.sort,
3983
- time: options.time,
3983
+ t: options.time,
3984
3984
  after: options.after,
3985
3985
  limit: options.limit
3986
3986
  }
@@ -9735,6 +9735,10 @@ var LoopNetClient = class {
9735
9735
  };
9736
9736
 
9737
9737
  // src/perplexity/client.ts
9738
+ function toQuery(params) {
9739
+ const { strictCountry, ...rest } = params;
9740
+ return strictCountry ? { ...rest, strict_country: true } : rest;
9741
+ }
9738
9742
  var PerplexityClient = class {
9739
9743
  client;
9740
9744
  constructor(client) {
@@ -9742,7 +9746,7 @@ var PerplexityClient = class {
9742
9746
  }
9743
9747
  /** Ask Perplexity a question. Generated from the OpenAPI spec; returns the raw response object. */
9744
9748
  async askPerplexityAQuestion(params = {}) {
9745
- return this.client.request("/v1/perplexity/ask", { params });
9749
+ return this.client.request("/v1/perplexity/ask", { params: toQuery(params) });
9746
9750
  }
9747
9751
  /** Ask Perplexity a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
9748
9752
  async askPerplexityAQuestionPost(body, params = {}) {
@@ -9750,7 +9754,7 @@ var PerplexityClient = class {
9750
9754
  }
9751
9755
  /** Measure a brand's visibility in a Perplexity answer. Generated from the OpenAPI spec; returns the raw response object. */
9752
9756
  async measureABrandSVisibilityInAPerplexityAnswer(params = {}) {
9753
- return this.client.request("/v1/perplexity/brand-visibility", { params });
9757
+ return this.client.request("/v1/perplexity/brand-visibility", { params: toQuery(params) });
9754
9758
  }
9755
9759
  /** Measure a brand's visibility in a Perplexity answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
9756
9760
  async measureABrandSVisibilityInAPerplexityAnswerPost(body, params = {}) {